[mapserver-users] RE: Problems with Query Template (Chameleon)

Lime, Steve D (DNR) steve.lime at state.mn.us
Wed Apr 13 14:59:34 EDT 2011


There’s nothing in the templates that would care about the data source be it shapefile or mapinfo tab file. If it were something like missing attributes you should get the template content back but without tags being processed. Can you take this outside of Chameleon to debug?

You could issue a query against the MasterMap Area layer and see what happens. For example:

  http://yourserver/cgi-bin/mapserv.exe?/yourmapfile.map&qlayer=MasterMap+Area&qindex=1&mode=indexquery

That should pull the first record from the MasterMap Area layer.

Steve

From: Andy Hird [mailto:andy.hird at aligned-assets.co.uk]
Sent: Tuesday, April 12, 2011 4:28 PM
To: Lime, Steve D (DNR); mapserver-users at lists.osgeo.org
Subject: RE: Problems with Query Template (Chameleon)

Steve

Thanks for the reply.

There are no errors being logged and as I say it works for files which are not MapInfo Tab files. For instance the following works fine.

LAYER
NAME "10K StreetView"
STATUS ON
TYPE RASTER
MINSCALEDENOM 6000                #600
MAXSCALEDENOM 22499             #2999
TILEINDEX "C:\ms4w\apps\XXXX\data\10K.shp"
TILEITEM "LOCATION"
CLASS
TEMPLATE "templates/XXXX.html"  #TOLERANCE 6 TOLERANCEUNITS PIXELS
END
END

I assume that this is because it’s a shp file which has a dbf file.

This does not work:

LAYER
NAME "MasterMap Area"
TYPE POLYGON
MINSCALEDENOM 1
MAXSCALEDENOM 5999
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "C:\ms4w\apps\XXXX\data\MM_Topo_Area.TAB"
STYLEITEM "AUTO"
CLASS
TEMPLATE "templates/XXXX.html"  #TOLERANCE 6 TOLERANCEUNITS PIXELS
END # Class section
HEADER "templates/XXXX_header.html"
FOOTER "templates/XXXX_footer.html"
END

Its bugging me like crazy as I can’t figure it out, - the second part of my question was:
“However If someone can provide example of placing a button on a html page that would call query functionality that would be very helpful too.”

If it’s easier for someone to advise on that it would be appreciated.

Thanks

Andy

From: Lime, Steve D (DNR) [mailto:steve.lime at state.mn.us]
Sent: 11 April 2011 22:49
To: Andy Hird; mapserver-users at lists.osgeo.org
Subject: RE: Problems with Query Template (Chameleon)

Not a Chameleon user so I may not be of much help. Any errors being logged? What does the template file look like? It’s possible that ms4w_2.3.1’s MapServer did not require a magic string be on the first line of the template. In new versions it is required. Basically the first line of a template must contain the string “MapServer Template”. Typically you’d put that in a HTML comment, e.g.:

<!—MapServer Tempate -->
...template follows...

That’s my first guess anyway.

Steve


From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Andy Hird
Sent: Friday, April 08, 2011 3:00 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Problems with Query Template (Chameleon)

Hi there  - really need some help if you can please regarding Template Query feature, and I have googled to exhaustion :-/

Background:
I have an existing Map file referencing MapInfo Tab files running under ms4w_2.3.1 & chameleon_ms4w-2.4.1
I have installed ms4w - V3.0.1 and chameleon V2.6.0
Copied my Map file across and made the necessary adjustments to get it working.

However when using the Query Widget (info of layers at mouse click) against MapInfo Layers it is no longer returning results, and yet it did previously.
My knowledge is not that great in php etc – but I suspect that its requiring a dbf rather than MapInfo Tab as it does work with a shp, dbf set of files.

Can Anyone help please as I really struggling – ideally I just want to use the old widget.

However If someone can provide example of placing a button on a html page that would call query functionality that would be very helpful too.

Thanks in advance

Andy



----------------------------------------------------------------------------
The information contained in or attached to this message is the responsibility of the sender and is meant for the confidential use of the intended recipients. It does not necessarily represent the position of Aligned Assets. If you are not an intended recipient you are notified that you have received this communication in error and that review, dissemination or copying of this communication is prohibited.

If you have received this in error, please notify us.
Aligned Assets Limited
Unit 5
River Court
Albert Drive
Sheerwater
Woking
GU21 5RP
Company Registration No: 4610724
----------------------------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110413/0889ceb1/attachment-0001.html


More information about the mapserver-users mailing list