Opened 18 years ago

Last modified 18 years ago

#1763 new defect

nquery creates bad imagemaps when searchmap=true and using mapxy and scale to create map

Reported by: john.cole@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.8
Severity: normal Keywords:
Cc:

Description

I have a routine that creates maps at a certain scale at a given point and I
want to add an image map.  Using the same url that created the map and changing
the mode to nquery and searchmap=true results in an imagemap like:

    <map id="mymap" name="mymap">
	<area shape="circle" coords="-2147483648,-2147483648,7"
href="http://my.url/mypage.cfm?region=5" title="Keel, Lee  " alt="Keel, Lee  ">
	<area shape="circle" coords="-2147483648,-2147483648,7"
href="http://my.url/mypage.cfm?region=5" title="Smith, Toby J" alt="Smith, Toby J">
	<area shape="circle" coords="-2147483648,-2147483648,7"
href="http://my.url/mypage.cfm?region=5" title="Cole, John W" alt="Cole, John W">
	<area shape="circle" coords="-2147483648,-2147483648,7"
href="http://my.url/mypage.cfm?region=5" title="Doe, John C" alt="Doe, John C">

</map>

Where the coords appear to be error numbers.

If I set mapext instead of using mapxy and a scale, the imagemap works fine, but
the searchmap description leads me to believe that it shouldn't matter how the
extents were created, it should just use the current mapextents to perform the
query.

Change History (4)

comment:1 by sdlime, 18 years ago

John: What does your template look like?

Steve

comment:2 by john.cole@…, 18 years ago

Steve,
  I copied it from the mapserver site and simply changed the field tags (I'm not
using the URL just yet, give me a few hours).

	<area shape="circle" coords="[shpxy precision=0 proj=image yf=",7" xf=","]"
href="http://my.url/mypage.cfm?region=[id]" title="[last_name], [first_name]
[middle_name]" alt="[last_name], [first_name] [middle_name]">

John

comment:3 by sdlime, 18 years ago

And the LAYER def for the one in question? Also, what MapServer version?

Steve

comment:4 by john.cole@…, 18 years ago

Steve,
  We are using Mapserver 4.8.1 (from MS4W).

Here is the layer section (and one class).

	LAYER
		NAME "trackee_pos"
		TYPE POINT
		GROUP "trackee"
		CONNECTIONTYPE postgis
		CONNECTION "user=mapserver password=mapserver dbname=tracker
host=mapserver.uai.com" 
		DATA "the_geom from ua_v_unit_position_map USING SRID=-1, USING UNIQUE id"
		TEMPLATE "imagemap.html"
		HEADER "imagemapheader.html"
		FOOTER "imagemapfooter.html"
		METADATA
			"wms_title" "trackee_pos"
			"wms_srs" "EPSG:4326"
		END
		PROJECTION
			"init=epsg:4326"
		END
		#MAXSCALE 2400
		STATUS on
		CLASSITEM "level"
		
		LABELMINSCALE 1
		LABELMAXSCALE 8000
		CLASS
			NAME 'In Zone'
			EXPRESSION "0"
			TEXT (ID: [id]`Name: [last_name], [first_name] [middle_name]`Notes: [notes])
			STYLE
				COLOR 0 0 0 
				SYMBOL 'circle'
				SIZE 9
			END 
			STYLE
				SYMBOL "circle" 
				SIZE 7
				COLOR 0 255 0
			END 
			LABEL
			
				COLOR 0 0 0
				OUTLINECOLOR 255 255 255
				TYPE TRUETYPE
				FONT arial
				SIZE 8
				ANTIALIAS TRUE
				POSITION AUTO
				FORCE TRUE
				WRAP "`"
				PARTIALS FALSE
			END
		END


And the projection section

PROJECTION
	  "init=epsg:4326"
	  #"init=epsg:26930"
END
Note: See TracTickets for help on using tickets.