11

I'm working on an application that renders GeoJSON into OpenLayers map.

The idea is about not having PNG images downloaded from external services (OSM or Bing) but having geo-information in GeoJSON file and rendering them in real-time. From my research this technology seems to be called 'vector tile'. I had a look at some of the guys' websites such as http://openstreetmap.us/~migurski/vector-datasource/ and http://mike.teczno.com/notes/postgreslessness-mapnik-vectiles.html (same guy).

His work seems to be what I want to achieve but I do not really get how it works.

From my understanding, since I use OpenLayers, a client retrieves map data in GeoJSON format and transfers them into vectors using OpenLayers' GeoJSON parser. But it's just the terms used in this technology that I do not get.

In his blog he described that there will be a server that provides data that is called 'MapNik Vector Tile' format. What's the difference between vector tile and GeoJSON? does it simply mean tiled GeoJSON that corresponds to the bounding box? Or is it a new image type?

If you have a look at his example, you can observe the labels on roads are aligned with the strokes of the roads. I tried to do the same on OpenLayers by changing Renderer code in OpenLayers but I'm only able to rotate labels but not make them bend them along the roads (E.g., when roads have corners, map displays labels in 'L' shape. ** + very well rendered!

It looks like Mike (the author of the blog) uses some different map besides OpenLayers but I cannot figure out how he did it. There are so many questions to ask but I'd like to understand the above first.

2
  • I'm having trouble understanding the objective of your question. Do you want to know what vector tiles are in a general sense? Or do you want to know about the various types of vector tiles, why you should use them, and which format would be best for you? Commented Oct 24, 2013 at 8:24
  • @DevdattaTengshe Ultimately, I'd like to know how I can implement vector tiled map in OpenLayers. But from my research it seems this technology is experimental. But I wonder what's different between tiled geoJSON and MVT or other types of vector tiles. what's vector tiles? is there a format for vectors? or is it just a term? help me I'm very confused :(
    – Eugene Yu
    Commented Oct 24, 2013 at 22:59

2 Answers 2

5

The idea to transfer vector data instead of images and render it on the client side is not new. There are already a lot of tools/projects doing that. See for example this plugin of leaflet, polymap, and also the cartagen project. OpenLayer developer are trying to introduce it in the (long-awaited) version 3.0. Each of these initiatives use their own vector tile format (including the mapnik one) - a standard should certainly emerge in the future.

If you are interested in the principles behind and some relevant literature, you should have a look at this excellent paper (yes, I do self promotion :-):

Gaffuri, J., 2012. Toward web mapping with vector data. In: Xiao, N., Kwan, M.-P., Goodchild, M. F., Shekhar, S. (Eds.), Geographic Information Science. Vol. 7478 of Lecture Notes in Computer Science. Springer Berlin Heidelberg, Berlin, Heidelberg, Ch. 7, pp. 87-101.

A free version of the paper is available here. To sumarize it: Efficient vector web mapping = smart format for data and styles + zoom dependant generalisation + (tiling OR spatial indexing). A use case is visible here.

1

As i understand it, the vector tile format is used to feed a tile-renderer like Mapnik or TileMill, instead of using a database, like postgresql.

The geometries are not rendered in real time by a web client app like OpenLayers, not yet, but it's an interesting area of research :-)

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.