[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] displaying a specific extent of the map
From: "David William Bitner" <bitner () gyttja ! org>
Date: 2006-05-26 13:23:31
Message-ID: d2f53e190605260623k9682c3csf16753853054dd2e () mail ! gmail ! com
[Download RAW message or body]
I think that Mark was trying to point out that this is _not_ a javascript
list, but rather a list dedicated to the PostGIS extension to the PostgreSQL
database. The two code snips that you show have nothing at all to do with
PostGIS.
On 5/26/06, simflex <simflex@millenniumhealthproducts.com> wrote:
>
>
> hi Mark,
>
> I don't believe that sql server is the problem.
>
> Rather these 2 code snips:
>
>
> <script>
> function zoomToExt ent(box) {
> box_array = box.split(" ");
> minx = box_array[0]*1;
> miny = box_array[1]*1;
> maxx = box_array[2]*1;
> maxy = box_array[3]*1;
> width = (maxx - minx) + 200;
> height = maxy - miny;
> centerx = minx + (width / 2.0);
> centery = miny + (height / 2.0);
> lonlatPt = map.mcsToLonLat(centerx, centery);
> lon = lonlatPt.getX();
> lat = lonlatPt.getY();
> map.zoomWidth(lat, lon, width, 'FT');
> }
> </script>
>
>
> ***********************************************************************************
>
> <td>
> <a href="#" onClick="zoomToExtent('<%=tan%>');return
> false;">
> <font size="-1"><%=incidentlocation%></font>
> </a>
> </td>
>
>
> First of all, I am getting an error on the following lines:
>
>
> lonlatPt = map.mcsToLonLat(centerx, centery);
> lon = lonlatPt.getX();
> lat = lonlatPt.getY();
> map.zoomWidth(lat, lon, width, 'FT');
>
> If I remove them, then the following don't do anything at all:
>
>
>
> <td>
> <a href="#" onClick="zoomToExtent('<%=tan%>');return
> false;">
> <font size="-1"><%=incidentlocation%></font>
> </a>
> </td>
>
>
> Not sure what I am doing wrong here.
>
>
>
>
>
>
> -----Original message-----
> From: "Mark Cave-Ayland" m.cave-ayland@webbased.co.uk
> Date: Thu, 25 May 2006 10:49:21 -0400
> To: "'PostGIS Users Discussion'" postgis-users@postgis.refractions.net
> Subject: RE: [postgis -users] displaying a specific extent of the map
>
> > PostGIS is a spatial extension for PostgreSQL (http://www.postgresql.org
> > ) rather than MS-SQL Server. I'd suggest you
> > need to ask on either an MS-SQL or an ASP/Javascript coding site for
> help,
> > but without more information it's impossible to determine exactly what
> the
> > problem you're experiencing is.
> >
> >
> >
> >
> >
> > Kind regards,
> >
> >
> >
> > Mark.
> >
> > ------------------------
> > WebBased Ltd
> > 17 Research Way
> > Plymouth
> > PL6 8BT
> >
> > T: +44 (0)1752 797131
> > F: +44 (0)1752 791023
> >
> > http://www.webbased.co.uk
> > http://www.infomapper.com
> > http://www.swtc.co.uk
> >
> > This email and any attachments are confidential to the intended
> recipient
> > and may also be privileged. If you are not the intended recipient
> please< BR>> delete it from your system and notify the sender. You should
> not copy it or
>
> > use it for any purpose nor disclose or distribute its contents to any
> other
> > person.
> >
> > _____
> >
> > From: postgis-users-bounces@postgis.refractions.net
> > [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of
> simflex
> > Sent: 25 May 2006 14:16
> > To: postgis-users@postgis.refractions.net
> > Subject: [postgis-users] displaying a specific extent of the map
> >
> >
> >
> > Greetings all,
> >
> > First time user of this forum.
> >
> > We use a sql server db to store data including x, y values. and using
> ASP on
> > the front end to retrieve data
> >
> > Currently, we are do have a summary report laid out thus:
> >
> > incident id first name last name incident type, incident location
> >
> > 1 John Doe vehicular amber
> > street
> > ...
> > ...
> >
> *> Our issue arises because we want to be able to click on incident id to
> zoom*
> *
> > directly to the extent of the map where the incident occurred.
> >
> > so far, we are struggling with this. any ideas would greatly
> appreciated.
> >
> > Here is what we have got so far:
> >
> >
> >
> *
> *> <%
> >
> > Set cn=Server.CreateObject("ADODB.Connection")
> > nID = Request("RecordID")
> > 'response.write nID
> > 'response. end
> >
> > cn.Open "Driver={SQL Server};" & _
> > "Server=haoi;" & _
> > "Address=haoi,1433;" & _
> > "Network=DBMSSOCN;" & _
> > "Database=incidentsDB;" & _
> > "Uid=sa;" & _
> > "Pwd="
> >
> > SQL = "select incident_LOC, id,minlat,minlon,maxlat,maxlon from
> Incidents
> > where id =" & nID
> > Set rs = cn.Execute( SQL )
> > 'response.write SQL
> > 'response.end
> > %>
> > *
>
>
> >
> >
> > <%
> > cnt = 0
> > Do Until cur.EOF
> > cnt = cnt + 1
> > incidentlocation = cur(0).Value
> > recnum = CLng(cur(1).Value)
> > ileft = CLng(cur(2).value) - 250
> > ibottom = CLng(cur(3).Value) - 250
> > iright = CLng(cur(4).Value) + 250
> > itop = CLng(cur(5).Value) + 250
> >
> > ; tan = ileft & " " & ibottom & " " & iright & " " & itop
> >
> > %>
>
> >
> > <%=incidentlocation%>
> > <#10b70bee894b4b1b_>
> >
> >
> > <%
> > cur.MoveNext
> > Loop
> > %>
> >
> > <%
> > if cnt = 0 Then
> > %>
> > *No results*
>
> > <%
> > End If
> > rs.Close()
> > cn.Close()
> > %>
> >
> >
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
--
************************************
David William Bitner
bitner@gyttja.org
[Attachment #3 (text/html)]
I think that Mark was trying to point out that this is _not_ a javascript list, but \
rather a list dedicated to the PostGIS extension to the PostgreSQL database. \
The two code snips that you show have nothing at all to do with PostGIS. \
<br><br><div><span class="gmail_quote">On 5/26/06, <b \
class="gmail_sendername">simflex</b> <<a \
href="mailto:simflex@millenniumhealthproducts.com">simflex@millenniumhealthproducts.com</a>> \
wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div><p><br>hi \
Mark,<br><br>I don't believe that sql server is the problem.<br><br>Rather these 2 \
code snips:</p></div><div><span class="q"><br><br><script><br>function \
zoomToExt ent(box) {<br> box_array = box.split (" \
");<br> minx = box_array[0]*1;<br> miny = \
box_array[1]*1;<br> maxx = box_array[2]*1;<br> maxy = \
box_array[3]*1;<br> width = (maxx - minx) + 200;<br> height = \
maxy - miny;<br> centerx = minx + (width / 2.0);<br> centery \
= miny + (height / 2.0);<br> lonlatPt = map.mcsToLonLat(centerx, \
centery);<br> lon = lonlatPt.getX();<br> lat = \
lonlatPt.getY();<br> map.zoomWidth(lat, lon, width, \
'FT');<br>}<br></script></span> </div><div><p></p> \
<p>***********************************************************************************</p> \
<p></p></div><div><span \
class="q">
<td><br> \
<a href="#" onClick="zoomToExtent('<%=tan%>');return \
false;"><br> \
<font size="-1"><%=incidentlocation%></font><br> \
\
</a><br> \
</td><br><br><br></span></div><div>First of all, I am getting an error on the \
following lines:</div><div><span class="q"><br><br> lonlatPt = \
map.mcsToLonLat(centerx, centery); <br> lon = lonlatPt.getX();<br> \
lat = lonlatPt.getY();<br> map.zoomWidth(lat, lon, width, \
'FT');<br><br></span></div><div>If I remove them, then the following don't do \
anything at all:</div><div><span \
class="q"><br><br><br> \
<td><br> \
<a href="#" onClick="zoomToExtent('<%=tan%>');return \
false;"><br> \
<font size="-1"><%=incidentlocation%></font> \
<br> \
</a><br> \
</td><br><br><br></span></div><div>Not sure what I am doing wrong \
here.</div><div><span class="q"><br><br><br><br><br><br>-----Original \
message-----<br>From: "Mark Cave-Ayland" <a \
href="mailto:m.cave-ayland@webbased.co.uk" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">m.cave-ayland@webbased.co.uk</a><br>Date: Thu, \
25 May 2006 10:49:21 -0400<br>To: "'PostGIS Users Discussion'" <a \
href="mailto:postgis-users@postgis.refractions.net" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">postgis-users@postgis.refractions.net</a><br>Subject: \
RE: [postgis
-users]
displaying a specific extent of the map<br><br>> PostGIS is a spatial extension \
for PostgreSQL (<a href="http://www.postgresql.org" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">http://www.postgresql.org </a><br>> ) \
rather than MS-SQL Server. I'd suggest you<br>> need to ask on either an MS-SQL or \
an ASP/Javascript coding site for help,<br>> but without more information it's \
impossible to determine exactly what the <br>> problem you're experiencing \
is.<br>> <br>> <br>> <br>> <br>> <br>> Kind regards,<br>> \
<br>> <br>> <br>> Mark.<br>> <br>> ------------------------<br>> \
WebBased Ltd<br>> 17 Research Way <br>> Plymouth<br>> PL6 8BT<br>> \
<br>> T: +44 (0)1752 797131<br>> F: +44 (0)1752 791023<br>> <br>> <a \
href="http://www.webbased.co.uk" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)"> http://www.webbased.co.uk</a> <br>> <a \
href="http://www.infomapper.com" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">http://www.infomapper.com</a><br>> <a \
href="http://www.swtc.co.uk" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)"> http://www.swtc.co.uk</a> <br>> <br>> \
This email and any attachments are confidential to the intended \
recipient<br></span></div><div>> and may also be privileged. If you are not the \
intended recipient please< BR>>
delete it from your system and notify the sender. You should not copy it \
or</div><div><span class="q"><br>> use it for any purpose nor disclose or \
distribute its contents to any other<br>> person.<br>> <br>> _____ <br>> \
<br>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net" \
target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">postgis-users-bounces@postgis.refractions.net</a><br>> \
[mailto: <a href="mailto:postgis-users-bounces@postgis.refractions.net" \
target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">postgis-users-bounces@postgis.refractions.net</a>] \
On Behalf Of simflex<br>> Sent: 25 May 2006 14:16 <br>> To: <a \
href="mailto:postgis-users@postgis.refractions.net" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">postgis-users@postgis.refractions.net</a><br>> \
Subject: [postgis-users] displaying a specific extent of the map <br>> <br>> \
<br>> <br>> Greetings all,<br>> <br>> First time user of this \
forum.<br>> <br>> We use a sql server db to store data including x, y values. \
and using ASP on<br>> the front end to retrieve data <br>> <br>> Currently, \
we are do have a summary report laid out thus:<br>> <br>> incident id first \
name last name incident type, incident location<br>> <br>> 1 John Doe vehicular \
amber<br>> street<br> > ...<br>> ...<br>> </span></div><div><b>>
Our issue arises because we want to be able to click on incident id to \
zoom</b></div><div><span class="q"><b><br>> directly to the extent of the map \
where the incident occurred.<br>> <br>> so far, we are struggling with this. \
any ideas would greatly appreciated. <br>> <br>> Here is what we have got so \
far:<br>> <br>> <br>> <br></b></span></div><div><span class="q"><b>> \
<%<br>> <br>> Set \
cn=Server.CreateObject("ADODB.Connection")<br>> nID = \
Request("RecordID") <br>> 'response.write nID<br>> 'response.
end<br>>
<br>> cn.Open "Driver={SQL Server};" & _<br>> \
"Server=haoi;" & _<br>> "Address=haoi,1433;" \
& _<br>> "Network=DBMSSOCN;" & _ <br>> \
"Database=incidentsDB;" & _<br>> "Uid=sa;" \
& _<br>> "Pwd="<br>> <br>> SQL = "select \
incident_LOC, id,minlat,minlon,maxlat,maxlon from Incidents <br>> where id =" \
& nID<br>> Set rs = cn.Execute( SQL )<br>> 'response.write SQL<br>> \
'response.end<br>> %><br>> </b></span></div><div><p></p> <div \
align="center"><br>> <br>> <table><tbody> <tr><td><div><span \
class="q"><br>> <%<br>> cnt = 0<br>> Do Until cur.EOF<br>> cnt = \
cnt + 1<br>> incidentlocation = cur(0).Value<br>> recnum = \
CLng(cur(1).Value)<br>> ileft = CLng(cur(2).value) - 250 <br>> ibottom \
= CLng(cur(3).Value) - 250<br>> iright = CLng(cur(4).Value) + 250<br>> \
itop = CLng(cur(5).Value) + 250<br>> <br>> ; tan = ileft & " \
" & ibottom & " " & iright & " " & itop \
<br>> <br>> %> </span></div><div></div></td></tr></tbody><tbody> \
<tr><td><br>> <a href="#10b70bee894b4b1b_"><br>> <font \
size="-1"><%=incidentlocation%></font><br>> </a><br>> </td><td><br>> \
</td> </tr><tr><td><br>> <%<br>> cur.MoveNext<br>> Loop<br>> \
%><br>> </td></tr></tbody></table><br>> <%<br>> if cnt = 0 \
Then<br>> %><br>> <center><b>No results</b></center></div> <div><span \
class="q"><br>> <%<br>> End If<br>> rs.Close()<br>> cn.Close()<br>> \
%><br>> <br>> <br></span></div><div></div> \
</div><br>_______________________________________________<br>postgis-users mailing \
list<br><a onclick="return top.js.OpenExtLink(window,event,this)" \
href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users" \
target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br>
<br></blockquote></div><br><br clear="all"><br>-- \
<br>************************************<br>David William Bitner<br><a \
href="mailto:bitner@gyttja.org">bitner@gyttja.org</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic