[Geoprisma-dev] maxextent on OSM

Yves Moisan yves.moisan at boreal-is.com
Tue Sep 21 16:32:31 EDT 2010


  Le 2010-09-14 15:40, Alexandre Dube a écrit :
> Hi Yves,
>
>   To my eyes, it's an OpenLayers issue.  You should open a ticket 
> showing a live (very simple) openlayers demo demonstrating the problem.
>
>   For the time being, you could set the map center in your 
> template.xslt file directly.  That would do the trick on load but when 
> clicking on the "maxextent" button you would still be zoomed out of 
> your extent.  A quick fix for that could be to overwrite the control 
> like this (add this in your template.xslt) :
>
> OpenLayers.Control.ZoomToMaxExtent.prototype.trigger = function(){
>     if (this.map) {
>         this.map.setCenter(new OpenLayers.LonLat(55,55), 5);
>     }
> }
>
Just another remark : I notice on the GYMO example that for a given 
"view level" an oMap.getZoom() gives X for GYM and X+2 for OSM.  That 
is, for the same viewport, OSM always has a zoom level higher than the 
other GYM layers.  I tried changing the map object's <numzoomlevels> but 
it's always the same.  Weird.

Cheers,

Yves




More information about the Geoprisma-dev mailing list