4

I'm wondering how to tell if a map service (in web browser) is vector based or raster based.

What I think to understood so far is that Google Maps for example is vector based, because when you zoom in, street names do not get bigger but stay the same, therefore their data is not saved in raster format. Is that correct? And if that is the case, is Here Maps then definitely raster based? Because when I zoom in on their maps, labels get bigger at first just like when you zoom in on a picture. Only afterwards the new material is loaded and the labels appear smaller and more crisp again.

  • I don't see Google Maps behave different from the others. – AndreJ Aug 13 '15 at 12:30
  • @AndreJ It does actually, when you have a look at the street names while zooming. On Google Maps, labels do not get bigger while zooming. On Here Maps labels do get bigger at first and only after the tiles are loaded again the labels are displayed in the right size. – VollNoob Aug 13 '15 at 12:35
  • Map services are usually raster: an image (representation of the data at a given scale) is served to your browser. The "big" servers store their tiles at different scale and only send the tiles that are necessary for your screen and zoom level (or process tiles on the fly if they are not cached). It looks like what you observe is only a matter of speed (difficult to beat Google for speed). Changing or not changing the size of the label is a cartographic decision that is not linked with vector/raster format of your data. – radouxju Aug 13 '15 at 12:45
  • 2
    How data is stored and how it is served can be two different things. For instance, vector data can be pre-rendered server-side as raster tiles. So I doubt many map servers are 'fully' vector or raster (chacing aside). You can't tell by looking at the maps what a server is capable of. For that you need to issue a GetCapabilities request and test for WFS, WMS or other protocols you are interested in. Search this site and you'll find plenty of discussion on GetCapabilities requests. Also research the various web-mapping protocols. – MappaGnosis Aug 13 '15 at 12:54
  • @radouxju Ok, I understand that, but I also found Mapbox capable of zooming in and out without redrawing the tiles: mapbox.com/blog/mapbox-gl-js - Other than that I understood this article that Google Maps is now using vector based: engadget.com/2013/05/15/redesigned-google-maps-hands-on-io-2013 which is the source of the Wikipedia article that says "Vector tiles have been used by the Google Maps Android client since December 2010[7] and on the desktop client since 2013." – VollNoob Aug 13 '15 at 12:58
2

First of, the Google map JS clients are not Vector based. The effect of displaying e.g. text at the same size when zooming is a result of tiling and by providing new images for each zoom level.

For web based application or applications that fetches tiles from a server you can find out wether a map is vector or raster based by inspecting the network traffic. When panning or zooming a map you will see the client is fetching the map data. If it is vector based it will be a vector data format if it is raster based the data retrieved will be images (png/jpeg).

The following tile is captured when viewing google maps online:

https://www.google.no/maps/vt/pb=!1m4!1m3!1i15!2i17361!3i9531!2m3!1e0!2sm!3i372052023!3m7!2sen!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0

It is very likely though, that the server serving the tiles is using a vector source and render the tiles to raster images. These tiles are usually cached for faster fetching. This can explain how you can apply styling or filtering in google maps see https://mapstyle.withgoogle.com

GeoServer is a typical open source server which can perform this task on behalf of the client.

The reason why Google maps is acting more smoothly is because of they are using OpenGL (the GPU and not only CPU) to render the images. You can see this by viewing a Google map in a browser with no WebGL (e.g. IE10) support and compare the behaviour with a browser with has support for WebGL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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