[Mapserver-users] Focus immediately on a map feature

Eduardo Spremolla edspremolla at Antel.com.uy
Wed Sep 24 08:04:32 EDT 2003


What you need to use is a itemquery . look at this form:

<form method="GET" id="qrbs" action="/cgi-bin/mapserv" >
    <input type="hidden" name="map" id="map" value="[map]">
    <input type="hidden" id="ext" name="imgext" value="[mapext]">
    <input type="hidden" name="imgxy" value="[center]">
    <input type="hidden" name="mode" value="itemnquery">
    <input type="hidden" name="qlayer" value="rbs">
    <input type="hidden" name="map_rbs_filteritem" value="NOMBRE">
    Busqueda por radiobase <input type="text" id="rbs_name"
name="map_rbs_filter" value="">
    <input type="submit" name="Buscar" onClick="reparo2();">
</form>

here I search the rbs layer for a given name and got this template
filled:

<tr><td>[NOMBRE]</td><td>[nombdepto]</td></td>
<td><a
href="/cgi-bin/mapserv?map=[map]&imgext=[mapext]&imgxy=[center]&zoomdir=0&zoomsize=2&submit=Redibujar&mode=browse" >Browse</a></td></tr>
<tr><td colspan="6"><img border="2" src="[img]" height="300"
width="300"></td> </tr>


the second row in the table is what you wont: the feature zoomed map


LALO



El mar, 23 de 09 de 2003 a las 20:53, Matthew Haines escribió:
> Thanks to some helpful pointers I've gotten my map server up and running and 
> can now display a street map of Manhattan along with the street names.
> 
> Can someone point me in the right direction?  Now I want to spit out static 
> (ie, no pan and zoom) maps centered on a particular feature and zoomed to a 
> hardcoded level.  Ideally I would like to do this using the CGI access to 
> mapserver, that is by encoding all of the parameters in the URL and the .map 
> file.
> 
> Is it possible to do this from a static .map file and a URL generated on the 
> fly?  Or do I need to explore some of the scripting options for mapserver?  
> A pointer to some samples would be very helpful.
> 
> Here's a little more thorough explanation of what I want to do:
> 
> I have a map file (Bytes of the Big Apple) that consists of the tax blocks 
> for Manhattan (New York).  When I query the file with OGR I get something 
> like
> 
> OGRFeature(mn_tb):1403
>   TAXBLOCK(Real) =        1186
>   Style = [etc]
>   POLYGON (( ... etc ...))
> 
> Instead of displaying the full extent of the map, I want to center the map 
> over a particular TAXBLOCK and display maybe 1/2 mile radius.  Ideally I'd 
> have a URL that would have the TAXBLOCK variable in it and a non-changing 
> .map file.
> 
> Matthew
> 
> _________________________________________________________________
> High-speed Internet access as low as $29.95/month (depending on the local 
> service providers in your area). Click here.   https://broadband.msn.com
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list