[mapserver-users] zooming to a point with itemquerymap

Brian Fischer bfischer@mpls.houstoneng.com
Mon, 29 Apr 2002 15:38:44 -0500


This is a multi-part message in MIME format.

------_=_NextPart_001_01C1EFBD.DB230118
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Hi MapServer Users,

=20

I am trying to embed a mapserver generated image inside an ASP page and
am having some problems.  I don't even know if this is possible, but
here it goes.

=20

I am trying to use the itemquerymap mode to produce a map of the
selected point.  I can get a map zoomed to the full extent of my map
file, but I can not get a map zoomed in on the point.

=20

Here is the image tag inside the asp page.  This produces a map at full
extent.

<img
src=3D"/mapserv35/cgi-bin/mapserv.exe?map=3Dsitemap.map&mode=3Ditemquerym=
ap&la
yers=3D&qlayer=3Dwqsites4-25-02&map_wqsites4-25-02_filter=3D%22<%=3DrsSit=
eMap("s
iteid")%>%22&item=3DSITEID&value=3D<%=3DrsSiteMap("siteid")%>">

=20

=20

As soon as I put parameters in to zoom to the point, I get an error.=20

<img
src=3D"/mapserv35/cgi-bin/mapserv.exe?map=3Dsitemap.map&mode=3Ditemquerym=
ap&la
yers=3D&qlayer=3Dwqsites4-25-02&map_wqsites4-25-02_filter=3D%22<%=3DrsSit=
eMap("s
iteid")%>%22&item=3DSITEID&value=3D<%=3DrsSiteMap("siteid")%>&mapxy=3D[sh=
pmid]&b
uffer=3D50000">

=20

 I believe the reason why it does not work is because MapServer isn't
replacing [shpmid] with it's value.  I think this is a limitation of the
itemquerymap or I am simply using it wrong.  Has anyone done a similar
thing using only Mapserv CGI not mapscript?  Are there other modes I
could use to produce the same map?

=20

Thanks,

Brian


------_=_NextPart_001_01C1EFBD.DB230118
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle19
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi MapServer Users,</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am trying to embed a mapserver generated image =
inside an
ASP page and am having some problems.&nbsp; I don&#8217;t even know if =
this is
possible, but here it goes.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am trying to use the itemquerymap mode to produce a =
map of
the selected point.&nbsp; I can get a map zoomed to the full extent of =
my map
file, but I can not get a map zoomed in on the point.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Here is the image tag inside the asp page.&nbsp; This
produces a map at full extent.</span></font></p>

<pre><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&lt;img =
src=3D&quot;/mapserv35/cgi-bin/mapserv.exe?map=3Dsitemap.map&amp;mode=3Di=
temquerymap&amp;layers=3D&amp;qlayer=3Dwqsites4-25-02&amp;map_wqsites4-25=
-02_filter=3D%22&lt;%=3DrsSiteMap(&quot;siteid&quot;)%&gt;%22&amp;item=3D=
SITEID&amp;value=3D&lt;%=3DrsSiteMap(&quot;siteid&quot;)%&gt;&quot;&gt;</=
span></font></pre>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>As soon as I put parameters in to zoom to the point, =
I get
an error. </span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&lt;img =
src=3D&quot;/mapserv35/cgi-bin/mapserv.exe?map=3Dsitemap.map&amp;mode=3Di=
temquerymap&amp;layers=3D&amp;qlayer=3Dwqsites4-25-02&amp;map_wqsites4-25=
-02_filter=3D%22&lt;%=3DrsSiteMap(&quot;siteid&quot;)%&gt;%22&amp;item=3D=
SITEID&amp;value=3D&lt;%=3DrsSiteMap(&quot;siteid&quot;)%&gt;&amp;mapxy=3D=
[shpmid]&amp;buffer=3D50000&quot;&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;I believe the reason why it does not work is =
because MapServer
isn&#8217;t replacing [shpmid] with it&#8217;s value. &nbsp;I think this =
is a limitation
of the itemquerymap or I am simply using it wrong. &nbsp;Has anyone done =
a similar
thing using only Mapserv CGI not mapscript?&nbsp; Are there other modes =
I could
use to produce the same map?</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Thanks,</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Brian</span></font></p>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C1EFBD.DB230118--