I am using GeoMOOSE if that sheds new light on this...

What I am trying to do is click a button.
This calls a js page that runs some code every few seconds. Right now its 
simply refreshing a specific layer.
I want the code to grab the extent of the current map
I then use an XY to recreate a new extent.
Then zoom to that extent.

I am getting the XY from a database.  Testing to see if within current extent.
If not I want it to recenter (zoom to new extent I calculated)

Currently I am doing this in php...the only thing is that I cant figure out how 
to get the app to recenter from PHP.

I can do it from a button (see below) but I need it to work automatically

<h5 style="margin:0px; padding:0px;"><b>Zoom to View String:</b> <a 
href="javascript:Map.zoomToViewString(453633.29 + ',' + 4984898.68 + ',' + 
464278.99 + ',' + 4995544.38)"><img src="shared/images/view.png" border="0" 
title="Click to Zoom Map to PID"></a>

I have everything I need ( I think ) but need to figure out how to get the js 
page to retireve the extent, then I can fire to above off in javascript.

That make sense....

Thanks for your thoughts Steve...


-----Original Message-----
From: Steve Lime [mailto:[email protected]] 
Sent: Tuesday, October 06, 2009 1:25 PM
To: Jay Kapalczynski; '[email protected]'
Subject: [mapserver-users] RE: Extents

Why wouldn't you get the extent at the same time you get the map? You had to 
have one to retrieve
it in the first place. -Steve

>>> On 10/6/2009 at 1:17 PM, in message
<d7a5eac385604446ab1dd24bf4f5a918a00826a...@mg-mail.ci.maple-grove.mn.us>, Jay
Kapalczynski <[email protected]> wrote:
> Can I call or make a request from a .js page to get the extent of my map?
> 
> 
> From: Jay Kapalczynski
> Sent: Tuesday, October 06, 2009 8:35 AM
> To: [email protected] 
> Subject: Extents
> 
> I have a applications using MapServer.  I have a button that runs some code 
> on a .js page every few seconds.
> What I need to do is somehow get the map extent to the .js page.
> 
> Is it possible to write some javascript code to retrieve the maps extent 
> every few seconds?
> 
> Thanks

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to