[mapserver-users] Imagemap making . . . (last post didn't format very well., sorry . . .)

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Fri Apr 27 12:42:20 EDT 2012


If you just do a plain [shpxy] in a comment or something what do see?

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bob Basques
Sent: Friday, April 27, 2012 11:18 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Imagemap making . . . (last post didn't format very well., sorry . . .)


All,



So, I'm trying to make an imagemap of line segments that are all only two vertices long.  (two-point line strings) from postgres, I've verified this with to_NumPoints on both of the features described below.  This same template process works fine with SHP files.  I have to be missing something obvious.



Using this call(which grabs two of the segments):



http://gis.ci.stpaul.mn.us/datasets/DB/SAINT_PAUL/PUBLIC_WORKS/AVL/STREETS/trails_segments_public.map?mapext=555266.1928265226%20157102.55366815554%20577346.2664937055%20170723.37833297616&mapsize=924%20570&mode=nquery&searchmap=true&veh_id=2153&time_idx1=4/24/2012%209:55:00&time_idx2=4/24/2012%209:56:00



and that generates this SQL:



select "esn","veh_id","time_idx1","time_idx2","time_interval","time_diff_secs","dist","gps_speed1","gps_speed2","calc_speed","bearing",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as geom,"veh_id" from public.stmaint_trails_segments as t where the_geom && GeomFromText('POLYGON((555258.759391547 157102.553668156,555258.759391547 170723.378332976,577353.699928681 170723.378332976,577353.699928681 157102.553668156,555258.759391547 157102.553668156))',200068) and ( veh_id like '2153' AND time_idx1 > '4/24/2012 9:55:00' AND time_idx2 <'4/24/2012 9:56:00')



and SQL result:



11031823;"2153";"2012-04-24 09:55:13-05";"2012-04-24 09:55:31-05";"00:00:18";"18";474.708833608277;15.9;18.9;17.9813952124347;356.698784312184;"0107000000010000000102000000020000009aec99afc035214144b128eb9c430341158476038a3521411f0e92496c520341";"2153"

11031823;"2153";"2012-04-24 09:55:31-05";"2012-04-24 09:55:50-05";"00:00:19";"19";474.002298490239;18.9;13.1;17.0096518596976;359.825436952247;"010700000001000000010200000002000000158476038a3521411f0e92496c52034199201020873521413bbac5493c610341";"2153"



from this TEMPLATE:



<popup class="VEHICLES" shape="poly" coords="[shpxy proj=image buffer=7px]">

<title>ID: [veh_id]</title>

<item title="ESN:"> [esn]</item>

<item title="TimeStamp:"> [time_idx2]</item>

<item title="Speed (GPS):"> [calc_speed]</item>

<item title="Bearing:"> [bearing]</item>

<item title="Distance this segment:"> [dist]</item>

<item title="Time interval for this segment:"> [time_interval]</item>

</popup>



I get this as output:





<imagemap><name>Vehicles</name><style name="VEHICLES"><title><attr name="background" value="#0A0A0A"/><attr name="fontWeight" value="bold"/><attr name="color" value="#FFFFFF"/></title><contents><attr name="background" value="#AFA"/></contents></style><popup class="VEHICLES" shape="poly" coords="368,520 368,519 368,519 368,519 368,518 368,518 368,517 367,517 367,517 367,516 367,516 367,516 366,516 366,515 366,515 366,515 365,515 365,514 365,514 364,514 364,514 364,514 364,513 363,513 363,513 362,513 362,513 362,513 361,513 361,513 361,513 360,513 360,513 360,513 359,513 359,513 358,513 358,514 358,514 357,514 357,514 357,514 357,515 356,515 356,515 356,515 356,516 355,516 355,516 355,517 355,517 355,517 354,517 354,518 354,518 354,519 354,519 354,519 354,520 354,520 354,520 355,539 355,540 355,540 355,540 355,541 355,541 355,542 356,542 356,542 356,543 356,543 356,543 357,543 357,544 357,544 357,544 358,544 358,545 358,545 359,545 359,545 359,545 359,546 360,546 360,546 361,546 361,546 361,546 362,546 362,546 362,546 363,546 363,546 363,546 364,546 364,546 365,546 365,545 365,545 366,545 366,545 366,545 366,544 367,544 367,544 367,544 367,543 368,543 368,543 368,542 368,542 368,542 369,542 369,541 369,541 369,540 369,540 369,540 369,539 369,539 369,539 368,520"><title>ID: 2153</title><item title="ESN:"> 11031823</item><item title="TimeStamp:"> 2012-04-24 09:55:31-05</item><item title="Speed (GPS):"> 17.9813952124347</item><item title="Bearing:"> 356.698784312184</item><item title="Distance this segment:"> 474.708833608277</item><item title="Time interval for this segment:"> 00:00:18</item></popup><popup class="VEHICLES" shape="poly" coords="368,500 368,500 368,499 368,499 368,499 368,498 368,498 368,497 367,497 367,497 367,496 367,496 367,496 366,496 366,495 366,495 366,495 365,495 365,494 365,494 364,494 364,494 364,494 364,493 363,493 363,493 362,493 362,493 362,493 361,493 361,493 361,493 360,493 360,493 360,493 359,493 359,493 358,493 358,494 358,494 358,494 357,494 357,494 357,495 356,495 356,495 356,495 356,496 355,496 355,496 355,496 355,497 355,497 354,497 354,498 354,498 354,499 354,499 354,499 354,500 354,500 354,520 354,520 354,521 354,521 354,521 354,522 354,522 354,523 355,523 355,523 355,524 355,524 355,524 356,524 356,525 356,525 356,525 357,525 357,526 357,526 358,526 358,526 358,526 358,527 359,527 359,527 360,527 360,527 360,527 361,527 361,527 361,527 362,527 362,527 362,527 363,527 363,527 364,527 364,526 364,526 364,526 365,526 365,526 365,525 366,525 366,525 366,525 366,524 367,524 367,524 367,524 367,523 367,523 368,523 368,522 368,522 368,521 368,521 368,521 368,520 368,520 368,500"><title>ID: 2153</title><item title="ESN:"> 11031823</item><item title="TimeStamp:"> 2012-04-24 09:55:50-05</item><item title="Speed (GPS):"> 17.0096518596976</item><item title="Bearing:"> 359.825436952247</item><item title="Distance this segment:"> 474.002298490239</item><item title="Time interval for this segment:"> 00:00:19</item></popup></imagemap>








Where the heck are all those COORD values coming from, shouldn't there only be four (4) point pairs per feature (or is it five, repeat last point)?Thanksbobb




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120427/148f8963/attachment.html


More information about the mapserver-users mailing list