[Geomoose-users] debugging the identify function
Brent Fraser
bfraser at geoanalytic.com
Mon Oct 5 11:59:12 EDT 2009
Dan,
I ended up adding the following to ServiceManager.js (around line 160) in my
version of GM 1.6.1:
} else if(inputType.match(/imgpoint/)) {
var delim = inputs[i].getAttribute('delim');
if(!delim) { delim = ' '; }
var pImg = ServiceMap.groundUnitsToPixels(p[0]);
var pValue = pImg.toString(delim);
newInput.setAttribute('type','hidden');
newInput.setAttribute('value', pValue);
with the following in the XML (note the type="imgpoint"):
<service title="Identify" default="true" cursor="url(cursors/identify2.cur), auto"
icon="shared/images/toolbar/identify.jpg"
highlight="shared/images/toolbar/identify_selected.jpg"
locked="true" shape="point">
<url>/cgi-bin/mapserv.exe</url>
<input type="file" name="map" value="./identify.map"/>
<!--
<input type="point" name="mapxy" delim=" "/>
-->
<input type="imgpoint" name="imgxy" delim=" "/>
<input type="extent" name="imgext" delim=" "/>
<input type="visiblelayers" name="layers" delim=" "/>
<input type="imagesize" name="imgsize" delim=" "/>
<input type="hidden" name="mode" value="nquery"/>
</service>
With those changes, the Identify service now will work with points.
One problem I noticed is that because the hot-spot for the Identify cursor is
not at the center of the cross (it is at the upper left limit of the cursor
image), I need to set my TOLERANCE value to 20 pixels so mapserver will find a
feature at the cross center point.
Is there some way to set the cursor hot-spot location?
Thanks!
Brent Fraser
Dan Little wrote:
> Unfortunately not, you could add this functionality in url.js.
>
>
> ----- Original Message ----
>> From: Brent Fraser <bfraser at geoanalytic.com>
>> To: geomoose-users at lists.sourceforge.net
>> Sent: Wednesday, September 30, 2009 4:49:47 PM
>> Subject: [Geomoose-users] debugging the identify function
>>
>> In GM v1.6.1 I'm trying to debug the identify function. Is there a way
>> I can pass imgxy (pixel coordinates) instead of map coordinates?
>>
>> In other words instead of:
>>
>>
>> do something like:
>>
>>
>> or whatever GM would consider a valid identifier for image coords...
>>
>> Thanks!
>> Brent Fraser
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>
>
>
>
>
More information about the Geomoose-users
mailing list