[Geoprisma-dev] maxextent on OSM

Yves Moisan yves.moisan at boreal-is.com
Tue Sep 14 16:14:39 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);
>     }
> }
>
Thanx Alexandre.  That works fine thanx.  Maybe we could devise some 
option in the configuration and handle it more nicely in the xslt later on.

Yves




More information about the Geoprisma-dev mailing list