[MAPSERVER-USERS] problem with map.zoomToExtent

BrainDrain paulborodaev at gmail.com
Wed Aug 13 02:31:13 EDT 2008


OpenLayers works perfectly if it configured correctly.
first of all you need to setup base OpenLayers layer (map server layer in
your case as I understand). Note: OL uses some default values for map obj:
DD units and EPSG:4326 proj (wgs84 LL) ... etc.
You need to spec. your own. spatialreference.org can help.
from my exp. - in current 2.6 version you need to "normalize" map obj with
some parameters from base layer / I mean:
'maxExtent','minExtent','maxScale','minScale','maxResolution','minResolution','units','projection'.
Older versions (for ex. used in fusion mapping js lib) did this
automatically.

S.Reena wrote:
> 
> i have three files... one html, one javascript and one php....i am
> handling database through php file and sending the result of that to a
> function in javascript file..
> echo " \"javascript:zoomVillage($box1,$box2,$box3,$box4)\" Open Map ";
> 
> These are ST_box2D() data which i hv split in 4 parts ...the thing is if i
> alert these values in that function..its working..but i i do like
> 
> map.zoomToExtent(new OpenLayers.Bounds(str1,str2,str3,str4))  where str1
> etc contain the passed values.. 
> 
> this doesn't work..
> 
> Can any1 help?
> 
> Cheers,
> S.Reena
> 

-- 
View this message in context: http://www.nabble.com/problem-with-map.zoomToExtent-tp18902842p18957700.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list