
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