-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2863b1d
commit b416048
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
# nym | ||
# nym | ||
|
||
A simple interactive map of NY with points of interest. | ||
|
||
## How does it work? | ||
|
||
The site uses LeafletJS library to display an interactive map, with markers added to display points of interest using Javascript. | ||
|
||
An example marker can be viewed in script.js | ||
``` | ||
const marker = L.marker([40.75703,-73.98597]).addTo(map) | ||
.bindPopup('<b>Time Square</b><br />Famous for new year celebrations.').openPopup(); | ||
``` | ||
|
||
## How to add a marker? | ||
|
||
Visit https://www.openstreetmap.org/search?query=times%20square#map=14/40.7550/-73.9763&layers=N | ||
|
||
Zoom in and out to find a point of interest. | ||
|
||
Right click on the map at a point of interest, and select *Show address* | ||
|
||
The latitude and longitide will be displayed in the sidebar. | ||
|
||
Make a note of these coordinates | ||
|
||
Add a marker to the script.js and ensure it works | ||
|
||
## Where can I learn about Leaflet? | ||
|
||
You can view the documentation at https://leafletjs.com/reference.html | ||
|
||
|