[mapguide-users] Open map and Zoom to data
Kenneth, GEOGRAF A/S
ks at geograf.dk
Tue Nov 6 06:55:43 EST 2007
You will have to create a copy of the WebLayout, then alter the initial
zoom in the WebLayout.
Next step is to save the WebLayout in the session repository, and point
the mapviewer to this new temporary WebLayout.
Regards, Kenneth, GEOGRAF A/S
Ismael Cams skrev:
> 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
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071106/18ba191e/attachment.html
More information about the mapguide-users
mailing list