As I am writing the blog you might have guessed that answer is going to be yes. I mean not only drag, pinch and rotation but also retrieving map’s view (center coordinate, zoom level/ resolution and rotation angle) after applying many touch operations. So I want to create all maps navigation features and along with handling of maps view state in maps coordinate system. In some of my previous articles like Thematic map with geojson2svg and Interactive map for data visualization I have explained how easily we can create the SVG maps with GeoJSON data. In this article I’ll implement emptymap.js with Hammer.js to achieve maps navigation.
As conceptualized by me earlier the different components of online maps creation are data, visual rendering, converter and interaction. Once again I’ll brief about these components here, but In this article we’ll see a nice example of interaction. We’ll visualize the bilateral migration ‘to’ and ‘from’ a country by tapping the desired country on map.