[Geomoose-users] Identify tool
Jeffrey Schmitz
jeffreykschmitz at gmail.com
Wed Aug 4 20:27:09 EDT 2010
OK, so after another long day of debugging, I found the culprit of the
error. We are using full paths to our map files in the <file> tags of
the map source. Currently identify.php (and I suspect other services
as well) construct an array of attributes for each layer from a list
formed previously in the code. This list is separated by a ":"
character and therein lies the issue. When you have a full path
C:/ms4w/whatever the colon is treated as a list separator and the path
to the mapfile inside the identify.php is set to simply "C". This
obviously causes a whole range of issues, so I changed the list
delimiter from ":" to "|", which seems to have fixed the problem. The
only issue now is that I don't see any results in the information tab.
I think that this should be fairly easy to figure out though. Anyways,
is this something that should be fixed in future versions of geomoose
or should we not be using full paths in the first place? Thanks every
ones help!
-Jeff
On Wed, Aug 4, 2010 at 3:39 PM, Len Kne <lkne at houstoneng.com> wrote:
> Couple more ideas:
>
> 1. Check conf/setting.ini and make sure the paths are correct for the data and the mapserver_url. The services use there settings to find the map files and MapServer.
>
> 2. Put an EXTENT tag in the map file, I can't remember if Identify uses the extent from the map file, but I know that one of the service does.
>
> 3. Comment out the error reporting line (near the top of indentify.php) to see if that gives more error messages that might point to the cause
>
> 4. Make sure PHP and mapscript are installed and working on the server
>
> Len
>
> -----Original Message-----
> From: Jeffrey Schmitz [mailto:jeffreykschmitz at gmail.com]
> Sent: Wednesday, August 04, 2010 3:28 PM
> To: Len Kne; geomoose-users at lists.sourceforge.net
> Cc: Dara Olson
> Subject: Re: [Geomoose-users] Identify tool
>
> Thanks for the help!
>
> I did add the suggested line to the metadata section, and verified that the projection and table were correct... still isn't working.
> I realized I never posted the actual error windows that pop up. They read:
>
> "Unhanded request Return Internal Server Error" quickly followed by "Invalid Response"
>
> anything else I could possibly be missing? I can't seem to find anything...
>
> -Jeff
>
> On Wed, Aug 4, 2010 at 9:02 AM, Len Kne <lkne at houstoneng.com> wrote:
>> 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