[Geomoose-users] Identify tool
Len Kne
lkne at houstoneng.com
Wed Aug 4 10:02:17 EDT 2010
Hi Jeff
In GeoMOOSE 2.x, the template needs to be defined in the layer METADATA object, something like:
METADATA
'identify_record' 'c:/ms4w/apps/maps.development/htdocs/identify/governmental_units/counties_identify.html '
END
Also make sure your map projection is 900913 to match the layer. Might also check that the_geom field has an entry in the geometry_columns table - this is probably ok if the layer is displaying but not working with ID.
Len
-----Original Message-----
From: Jeffrey Schmitz [mailto:jeffreykschmitz at gmail.com]
Sent: Tuesday, August 03, 2010 5:19 PM
To: geomoose-users at lists.sourceforge.net
Cc: Dara Olson
Subject: [Geomoose-users] Identify tool
Hello Geoomoose Users!
I am having trouble getting my identify tool to work. I am switching back from having a tiled wms map sources, to just using mapserver with mapfiles. The problem is, this seems to have broken my identify tool.
After quite a bit of debugging, I feel stuck, so I thought I'd send a message out and see if anyone has any ideas.
I have narrowed down the failure to the line in identify.php that calls queryByPoint (line 127 for me)
if($queryShape->type == MS_SHAPE_POINT) {
$point = $queryShape->line(0)->point(0);
$map->queryByPoint($point, MS_MULTIPLE, -1);
$substArray['mapx'] = $point->x;
$substArray['mapy'] = $point->y;
}
If I use firebug, it points to this section in openlayers.js:
try {
var response = new OpenLayers.Ajax.Response(this);
if (this.options.onCreate) {
this.options.onCreate(response);
}
OpenLayers.Ajax.Responders.dispatch('onCreate', this, response);
this.transport.open(this.method.toUpperCase(), this.url, this.options.asynchronous);
if (this.options.asynchronous) {
window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,
this, 1), 10);
}
this.transport.onreadystatechange = OpenLayers.Function.bind(this.onStateChange, this);
this.setRequestHeaders();
this.body = this.method == 'post' ? (this.options.postBody
|| params) : null;
this.transport.send(this.body);
if (!this.options.asynchronous && this.transport.overrideMimeType) {
this.onStateChange();
}
} catch (e) {
this.dispatchException(e);
}
It fails at that line the "this.transport.send(this.body)" with "this.body" being set to null.
I have verified that the correct point coordinates are being sent in the queryByPoint section, and to narrow down the problem further, only have one queryable layer turned on, which looks like this:
LAYER # Counties
NAME "counties"
INCLUDE "glifwc_connection.map"
TYPE POLYGON
DATA "the_geom900913 FROM governmental_units.counties using unique gid using srid=900913"
METADATA
"wms_title" "counties"
"gml_include_items" "state,county,fips_st_cnty_code"
END
STATUS ON
PROJECTION
"init=epsg:900913"
END
DUMP TRUE
CLASS
NAME "Counties"
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 77 38 0
END
TEMPLATE "c:/ms4w/apps/maps.development/htdocs/identify/governmental_units/counties_identify.html"
END
END # counties
Am I missing anything? Are any requirements for the identify tool/queryByPoint not being met? What would be a good next step in debugging?
Thanks again for any help!
-Jeff
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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