[Geoprisma-dev] maxextent on OSM

Yves Moisan yves.moisan at boreal-is.com
Tue Aug 31 15:09:33 EDT 2010


  Le 2010-08-31 13:22, Alexandre Dube a écrit :
> Yves,
>
> Ok, it would seem that defining a 'maxExtent' option to the 
> OpenLayers.Map object automatically set the maxExtent of the layers 
> added, but not the XYZ (OSM) ones.  They are automatically calculated 
> and ignore the one from the map.
>
> I guess that adding the 'maxExtent' property to the layer should do 
> the trick (currently not supported in GeoPrisma), but how come it 
> doesn't I don't know.  This question should be asked to 
> OpenLayers-Users ML I guess.
Alexandre,

I thought about going to an OL list but the examples I checked from the 
OL examples web site worked for OSM.  In fact they are often doing a 
getBounds apparently.

Thanx

Yves


>
> Regards,
>
> Alexandre
>
>
> On 10-08-31 12:09 PM, Yves Moisan wrote:
>>  Le 2010-08-31 11:02, Alexandre Dube a écrit :
>>> Hi,
>>>
>>>   Could you please create a patch containing your changes showing 
>>> the issue and attach it to this thread ?
>> Just replace :
>>
>> <!--maxextent>-20037508.34,-20037508.34,20037508.34,20037508.34</maxextent--> 
>>
>> <maxextent>11548635,-5889094,18604187,-597430</maxextent>
>>
>> in config-google.xml and you'll see Google will center in on 
>> Australia.  If you then click on the OSM layer, it will also show 
>> zoomed in on Australia.  The problem occurs when you do the following :
>>
>> put the layer <layername>LYROSM</layername> as the first to draw (so 
>> that the OSM layer is the default baselayer showing on load)
>>
>> Switching the layer position in the layertree has no effect.  It's 
>> really when the OSM layer is drawn first that the problem occurs.  I 
>> wonder if the problem is with the OSM layer constructor we use in GP.
>>
>> Funnily enough, if you try drawing a Yahoo or Google layer first, the 
>> initial zoom will show Australia centered.  If you put a Bing layer 
>> as the 1st layer to draw, the image will be zoomed in but Australia 
>> will show on the right-hand side.  Putting the OSM layer first shows 
>> no zoom at all.  Weird ...
>>
>> Cheers,
>>
>> Yves
>>
>>
>>>
>>> Alexandre
>>
>> _______________________________________________
>> Geoprisma-dev mailing list
>> Geoprisma-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
>
>




More information about the Geoprisma-dev mailing list