Wednesday, March 20, 2013

Geography Puzzles on Google Maps


Vasile Cotovanu has been inspired by the new draggable polygons option in the Google Maps API to create the template for a Google Maps Geography Puzzle. The template allows anyone to create a game in which players have to drag geographical areas onto their correct position on a Google Map.

The code for the Vasile Geopuzzle is available on GitHub and can be easily customised for any area in the world. To create your own puzzle with the code all you really need is the GeoJSON data for the polygons you wish to use.

Vasile has created a demo game using the code for Switzerland's Cantons. In the demo game players have to drag polygons of the Swiss cantons onto their correct location. A timer keeps track of how long it takes to compete the game and your current score is also displayed on the map.

The game makes effective use of Vasile's popular Masked Polygons library. The Masked Polygon library is used to define the boundary of the game. For example, in the Switzerland Cantons game Switzerland is highlighted on the map using the masked polygon library. Consequently players can clearly see the area of game-play on the map.

No comments:

Post a Comment