![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEtLgSXegOVLv1k3V1LFmpA1lDooR6v3_FppG1BFsOMMGEhuL8bi8sFI4wKhYdBae6b0c5mDaqvZ3haxPXn9yDldnYHgT2DANbpzaF1WSczB0G9gl5cL4HwsK4B66MrJIuMNkv/s523/mapsmania.gif)
Swiss Trains have open-sourced the code for a very cool masking effect on Google Maps.
The effect transforms a KML polygon into a mask that effectively highlights the polygon on the map by shading the rest of the world. You can see a demo of the effect on this Swiss Administrative Boundaries Map.
When you select a region on the Administrative Boundaries Map the chosen area is highlighted and the rest of the map shaded out.
The mask is a very effective tool. If you want to use the effect in your own Google Maps then grab the code from GitHub - Masked Polygons.
______________
No comments:
Post a Comment