[maplab-users] Zoom To Feature

Zak James zak-ms at hoppsan.org
Thu Jun 3 11:23:26 EDT 2004


On Jun 3, 2004, at 7:36 AM, Swapan Mazumdar wrote:

> 1) How can I implement zoom to an Item(Feature) in MapLab. Please refer
> to the demo shown in case 1 on
>
> http://maps.dnr.state.mn.us/mapserver_demos/tests36/itemquery/ 
> test.html.
>
> Actually I would have like to zoom to polygon(province) from a dropdown
> list.

You would have to edit the php code generated by gmapfactory to do  
this. It's not really a good solution as gmapfactory was never intended  
to generate extendable applications. The ideal solution for this  
problem is the chameleon package (see http://www.maptools.org) which  
already has a 'widget' for zooming to pre-defined map extents. You  
could take the sample chameleon application and modify it for your  
purposes. The chameleon application's template is just an html document  
with extra tags so it is relatively straightforward to edit.

> 2) Is it possible to provide an option of active layer in the published
> mapping application?

Again, you would have to write your own code and chameleon already has  
similar functionality in some of its widgets (the locate widget, for  
instance).

> 3) All my .map files work fine with MapLab. But why I am not able to
> Test With A GetMap Request using
>
>     http://localhost/cgi-bin/mapserv?map=
> tutorial.map&VERSION=1.1.0&REQUEST=GetMap
>
>     Just like what is it is explained in
> http://localhost/msapps/maplab-2.1-rc3/htdocs/mapedit/docs/wms-server- 
> ho
> wto.html

Make sure that your wms layer has all the required metadata. What error  
message do you get?


--
Zak James
Applications and Software Development
DM Solutions Group Inc.
http://www.dmsolutions.ca





More information about the Maplab-users mailing list