<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I managed to get the UTFGrid working as a tile service from
MapServer (rather than via WMS). I simply had to set the map's image
type using runtime substitution by adding
"&map.imagetype=utfgrid" to the querystring e.g.<br>
<br>
mapserv -nh
"QUERY_STRING=map=C:/mapserver-tutorial-data/mapfiles/utf_grid.map&layers=countries&mode=tile&tile=0+0+0&tilemode=gmap&map.imagetype=utfgrid"<br>
<br>
I then ran into a further problem. The UTFGrid only returns Unicode
replacement characters so is unusable. <br>
<br>
I did some debugging and in the maputfgrid.cpp file there is the
following line:<br>
<br>
utf8 = msConvertWideStringToUTF8 (string, "UCS-4LE");<br>
<br>
It takes a string such as " ((
77777 " and returns a junk
looking string such as
"øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øŠ€€¨øˆ€€ ø°€ ø°€·ø°€·øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€€ øˆ€"<br>
<br>
I'm not sure where the "UCS-4LE" encoding is coming from. I'm
running on a Windows server which could make a difference, however I
tried a few other encodings with no success. The dataset is a
shapefile. <br>
Has anyone got the UTFGrid output working on Windows?<br>
<br>
Thanks,<br>
<br>
Seth<br>
<br>
<div class="moz-cite-prefix">On 18/03/2016 22:54, Seth G wrote:<br>
</div>
<blockquote cite="mid:56EC78FF.7030403@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Hi list,<br>
<br>
I'm looking at trying to set up an OpenLayer3 demo using the
UTFGrid format provided by MapServer. <br>
<br>
<a moz-do-not-send="true"
href="http://mapserver.org/development/rfc/ms-rfc-93.html#rfc93">http://mapserver.org/development/rfc/ms-rfc-93.html#rfc93<br>
</a><a moz-do-not-send="true"
href="http://mapserver.org/output/utfgrid_output.html">http://mapserver.org/output/utfgrid_output.html</a><br>
<br>
As luck would have it, it appears OpenLayers2 actually has a
better implementation on the client-side. See links:<br>
<br>
<a moz-do-not-send="true"
href="http://dev.openlayers.org/examples/utfgrid.html">http://dev.openlayers.org/examples/utfgrid.html</a><br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://dev.openlayers.org/docs/files/OpenLayers/Layer/UTFGrid-js.html">http://dev.openlayers.org/docs/files/OpenLayers/Layer/UTFGrid-js.html</a><br>
<br>
OL3 seems to require a server-side component to return a callback
with details on the service. Even if I set this up, it expects the
UTFGrid service to use a tile grid format ({x}{y}{z}). <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://openlayers.org/en/v3.14.2/examples/tileutfgrid.html"><a class="moz-txt-link-freetext" href="http://openlayers.org/en/v3.14.2/examples/tileutfgrid.html">http://openlayers.org/en/v3.14.2/examples/tileutfgrid.html</a></a><br>
<br>
I can configure MapServer to return UTFGrids using WMS GetMap
requests (as stated in the RFC), but not when using the tile mode
- <a moz-do-not-send="true"
href="http://mapserver.org/output/tile_mode.html">http://mapserver.org/output/tile_mode.html</a><br>
<br>
I can probably hack together a workaround to work out tile numbers
from BBOXes, but I was wondering if I'm missing something simple
to get this to work directly. <br>
Has anyone manged to set this up?<br>
<br>
Thanks for any advice,<br>
<br>
Seth<br>
<br>
<div class="moz-text-html" lang="x-western"> <font
color="#888888">--<br>
web:</font><a moz-do-not-send="true"
href="http://geographika.co.uk"><font color="#888888"> </font>http://geographika.co.uk</a><br>
<font color="#888888">twitter: @geographika<br>
</font><br>
</div>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>