New Replicating The Nyt's Java Map


I was impressed today alongside the elementary blueprint of the New York Times' 101 Places to Find Great Coffee inward New York. I actually similar how the paper has used the Leaflet mapping platform to practise a gray-scale map, alongside non-essential areas masked out in addition to route names which alone appear when yous zoom inward on the map.

One of my kickoff thoughts was to wonder if yous could practise a similar looking map alongside the Google Maps API. The New York Knockout Map is the result. To enshroud the non-important areas of the map I used Vasile Cotovanu's polygon masking wizard Geomask. Using Geomask it is possible to practise a doughnut type polygon which alone shows the map through the hole inward the doughnut polygon. The effect is that the areas to the due west of Manhattan are hidden from sentiment on my finished map.

I used the Google Maps API Styled Map magician to practise the gray-scale map tiles in addition to to enshroud the route elevate labels on the map. However I practise desire the route names to appear on the map when the user zooms in, thus I had to practise an lawsuit listener to banking firm lucifer when the zoom levels is changed. I in addition to thus created about other map agency alongside the route elevate labels turned on. Using the zoom lawsuit listener I tin in addition to thus switch betwixt the 2 map styles (one alongside route elevate labels in addition to i without) depending on the zoom degree of the map.

I quite similar the results in addition to intend it is a fairly accurate reproduction of the New York Times' java map. All I demand straight off is about information to map.
Buat lebih berguna, kongsi:
close