[Geomoose-users] Identify tool
Jeffrey Schmitz
jeffreykschmitz at gmail.com
Tue Aug 3 18:18:30 EDT 2010
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
More information about the Geomoose-users
mailing list