[mapguide-users] Open map and Zoom to data

Ismael Cams mapguide2007 at gmail.com
Tue Nov 6 06:32:58 EST 2007


You could make add another "hidden" frame to your frameset. Pass the incoming
parameters to the hidden frame and perform zoom and selection actions in
this hidden frame.

Something like:

<frameset rows="0,100,*" frameborder="NO" border="0" framespacing="0">
	<?php
			if(isset($params)){
				echo "<frame src=\"hidden.php?$params\" name=\"hidden\"/>";
			}else{
				echo "<frame src=\"hidden.php\" name=\"hidden\"/>";
			}
       ?>
<frame ... />
<frame ... />
</frameset>

You will also have to check first in the hidden page if the map is already
initiated before selecting and zooming. There are some examples on the forum
how to achieve this.




Mark Pendergraft wrote:
> 
> I'm trying to figure out how to open my map and have it automatically
> zoom to a feature by including a request querystring in the url.
> 
> For example http://localhost/mapguide/mga/mga.aspx?JobNo=04291  would
> zoom to the feature on the Jobs layer with a property of JobNo equaling
> 04291.
> 
>  
> 
> I have already written a search/zoom to application which uses this
> property.  It runs in the scriptFrame and is usually triggered from a
> button on a page that resides in the taskPane.
> 
>  
> 
> My application opens with a page, which creates 2 frames (titleFrame,
> viewerFrame).
> 
>  
> 
> The only way I can figure out how to do this, is to pass the request
> string to a Session.Item.  Then, I have some code in the task pane's
> default page which can submit a form using javascript to the
> scriptframe.
> 
>  
> 
> However, I was hoping to put all of this functionality into the opening
> page, that way I wouldn't have to pass variables using the session item.
> Which is more desirable, because if the user presses the home button in
> the task area the code would execute again.
> 
>  
> 
> Does anyone have any ideas or experience with making the map zoom to a
> feature upon being opened?  Thanks.
> 
>  
> 
>  
> 
> Ph: (425) 486-1252  Fx: (425) 486-6108  www.meadgilman.com
> <http://www.meadgilman.com/> 
> 
>  
> 
> 
>  
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Open-map-and-Zoom-to-data-tf4609398s16610.html#a13604926
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list