Hi,
I also tried to get an example of the UTFGrid working with OL3. I was
using MapServer running under IIS on a Windows Server, and after
debugging it looks like there is a problem with MapServer/Windows and
text encoding that causes the UTFGrid output to be corrupt.
I have created a pull request with a fix for this issue at
https://github.com/mapserver/mapserver/pull/5342
Are you also using Windows?
You should be able to see the browser requests/responses using Chrome
developer tools, Firebug for Firefox, or Fiddler. At least then you will
know if MapServer is returning useful output.
Regards,
Seth
--
web:http://geographika.co.uk
twitter: @geographika
On 27/10/2016 11:30, Soline Villermois wrote:
Hi,
'm having troubles using utfgrid module with openlayers. The
implementation on Mapserver's side is quite simple, even if i have
doubts about the imagetype :
|MAP IMAGETYPE UTFGRID SIZE 20002000CONFIG
"MS_ERRORFILE""/ms4w/tmp/ms_error.txt"#DEBUG 4EXTENT
-176.197-31.0869181.4781.8381NAME "allexmaple"PROJECTION
"init=epsg:4326"END QUERYMAP STATUS ON END OUTPUTFORMAT NAME
"utfgrid"DRIVER UTFGRID MIMETYPE "application/json"EXTENSION
"json"FORMATOPTION "UTFRESOLUTION=4"FORMATOPTION "DUPLICATES=false"END
WEB IMAGEPATH "tmp/"IMAGEURL "tmp/"END SYMBOL NAME "mysymbol"TYPE
pixmap ANCHORPOINT 0.50.5IMAGE "icons/mysymbol.png"END LAYER TOLERANCE
10CONNECTIONTYPE postgis NAME "example"CONNECTION "host=127.0.0.1
dbname=ais_data user=postgres password=admin port=5432"DATA "geom from
mytable using srid=4326"STATUS ON TYPE POINT UTFITEM "id"UTFDATA
"{\"id\":\"[id]\",\"name\":\"[name]\"}"TEMPLATE 'query.html'HEADER
'header.html'FOOTER 'footer.html'CLASSITEM "ct"CLASS EXPRESSION
"mysymbol"STYLE ANGLE [angle]SYMBOL 'mysymbol'END #style END #classEND|
END
Openlayers, on the other hand, doesn't have efficient example. I don't
know what to provide in my url. Here's what I tried:
|vargridSource
=newol.source.TileUTFGrid({url:'http://localhost:5000/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/essai.map&layers=example&tiled=true&mode=map&type=utfgrid&format=application/json'});varmySuperLayer
=newol.layer.Tile({source:gridSource });|
But nothing appears and my url stays in pending until timeout
I just don't know how to debug that, any help would be highly appreciated
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users