[OpenLayers-Users] Re: problem with overview map

Christian Mayer mayer at terrestris.de
Wed Mar 23 04:21:09 EDT 2011


Hello Dan,

have you tried to create the overview map with the default settings? If 
this works, your options might be wrong.
Try this first:

         var overview1 = new OpenLayers.Control.OverviewMap({
             maximized: true
         });


If working you could add the following:

overview1.div = document.getElementById("YourOverviewMapDiv");


Maybe this exmaple helps you too: 
http://openlayers.org/dev/examples/overviewmap.html

Try this and maybe give feedback to the list.

Best regards,
Chris


Logo der terrestris GmbH & Co. KG

Dipl.-Ing. Christian Mayer
— Anwendungsentwickler —

terrestris GmbH & Co. KG
Irmintrudisstraße 17
53111 Bonn

Tel:   ++49 (0)228 / 96 28 99 -53
Fax:   ++49 (0)228 / 96 28 99 -57

Email: mayer at terrestris.de <mailto:mayer at terrestris.de>
Web: http://www.terrestris.de

Amtsgericht Bonn, HRA 6835
Komplementärin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams


Am 22.03.2011 15:51, schrieb vrbikdan:
> Still any idea? I think, that could be ok, if I set projection, cause my
> overview map is showing somewhere about 300 km to south-east, so I think,
> that it set projection EPSG: 4326 and no EPSG:900913. Here is the part of
> code I'm using:
>
> function mapa(){		
>          map = new OpenLayers.Map('jizerky',{
>                   controls: [
>                     new OpenLayers.Control.Navigation(),
>                     new OpenLayers.Control.ScaleLine()],
>                     projection: P900913,
> 		   displayProjection: P4326,
> 		   units: "m",
> 		   maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
> 20037508.34)
>          });
> 		
> 	gphy = new OpenLayers.Layer.Google("terénní",
> 		{type: G_PHYSICAL_MAP,
> 		sphericalMercator:true,
> 		});
>
>
> map.addLayer(gphy);
> map.setCenter(new
> OpenLayers.LonLat(15.205078122883185,50.86577799589138).transform(P4326,P900913),
> 11);
>
> var overview = new OpenLayers.Control.OverviewMap({
> 	div: document.getElementById('prehledkaContainer'),
> 	mapOptions: {
> 		units: "m",
> 		maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
> 20037508.34)}
> 		});
> map.addControl(overview);
> }
>
> I really don't know, what I should try, I'm trying something several days
> with no progress. Do you see some mistake in this code??
>
> Thanks, Dan
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/problem-with-overview-map-tp6190056p6196637.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
Skipped content of type multipart/related


More information about the Users mailing list