From 9c2be1f885cbf73119e34436a48758ca8dcbb5d3 Mon Sep 17 00:00:00 2001 From: Mingfei Yin Date: Sun, 29 Oct 2017 17:32:14 -0500 Subject: [PATCH] leaflet map practice, map with single marker and title --- leafletMapWithSimpleMarker/geo.css | 0 leafletMapWithSimpleMarker/geo.js | 54 + leafletMapWithSimpleMarker/geo.json | 1381 +++++++++++++++++ .../leafletMapWithSingleMarker.html | 22 + 4 files changed, 1457 insertions(+) create mode 100644 leafletMapWithSimpleMarker/geo.css create mode 100644 leafletMapWithSimpleMarker/geo.js create mode 100644 leafletMapWithSimpleMarker/geo.json create mode 100644 leafletMapWithSimpleMarker/leafletMapWithSingleMarker.html diff --git a/leafletMapWithSimpleMarker/geo.css b/leafletMapWithSimpleMarker/geo.css new file mode 100644 index 0000000..e69de29 diff --git a/leafletMapWithSimpleMarker/geo.js b/leafletMapWithSimpleMarker/geo.js new file mode 100644 index 0000000..fc13d57 --- /dev/null +++ b/leafletMapWithSimpleMarker/geo.js @@ -0,0 +1,54 @@ +var map = L.map('map').setView([-41.2858, 174.78682], 14); +mapLink = + 'OpenStreetMap'; + +// load and display the layer on the map: +//L.tileLayer( *urlTemplate*, *options*? ) + +L.tileLayer( + 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: 'Map data © ' + mapLink, + maxZoom: 18, + }).addTo(map); + +/*The urlTemplate is a string in the form http://{s}.mapdomain.org/{z}/{x}/{y}.png, +where the {s} will allow one of the subdomains of the main domain to be used. +These are typically used sequentially to make loading the map faster by allowing multiple parallel requests. +The {z} declares the zoom level and the {x} and {y} define the tile coordinates. +We will look closely at how these urls are formed in a future section of the book +since they are an interesting feature in themselves and it is useful to understand their working in relation to the map being displayed. + +The TileLayer options provides scope for a range of different options when loading or displaying the tiles. */ + +/*In our example we are retrieving our tiles from openstreetmap.org and setting options for attribution and maxZoom. + +attribution is the placing of appropriate reference to the source of the tiles. +The idea is to ensure that credit (and copyright acknowledgement) is provided to the tile provider as is reasonable. +In the example used here we place the words ‘Map Data’ and then a copyright symbol (which is produced by the text ©) +followed by the variable mapLink which is declared slightly earlier in the JavaScript code and is set to : +OpenStreetMap +which provides the text OpenStreetMap and a link to openstreetmap.org. + +maxZoom sets the maximum zoom level of the map. + +The .addTo method adds the tiles to the map.*/ + +// -----===== Adding a marker to the map =====----- + +var marker = L.marker([-41.29042, 174.78219], //Declare a variable with the L.marker method at [-41.29042,174.78219]. + {draggable: true, //set as false by default ******* Drag a marker + title: 'Hover Text', // add title to a marker + opacity: 0.8} // 0(transparent), 1(opaque) + ) + .addTo(map) // [simply add that to our map by adding .addTo(map)] + // Adding a popup to the map + .bindPopup("Te Papa
Museum of New Zealand.") + .openPopup(); // load popup when open the page, if delete it, it'll open when click on marker + +/* var marker = L.marker([-41.29042, 174.78219], + {option1: true, // a boolean value + option2: 'a string lives here', // a string + option3: 1234} // a number + ) + .addTo(map); +*/ \ No newline at end of file diff --git a/leafletMapWithSimpleMarker/geo.json b/leafletMapWithSimpleMarker/geo.json new file mode 100644 index 0000000..b446405 --- /dev/null +++ b/leafletMapWithSimpleMarker/geo.json @@ -0,0 +1,1381 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "Van Dorn Street", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.12911152370515, + 38.79930767201779 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Franconia-Springfield", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.16797018042666, + 38.766521892689916 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Federal Center SW", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.01586821694521, + 38.885072355144786 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Judiciary Sq", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.01663895662587, + 38.896090317663166 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Capitol South", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.00513941992737, + 38.885062500925 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Metro Center", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02807799718069, + 38.89831447321318 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Gallery Pl-Chinatown", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02191539042379, + 38.89831680979661 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Mt Vernon Sq - 7th St Convention Center", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02191438038649, + 38.906436814951725 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "U St/African-Amer Civil War Memorial/Cardozo", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.0274958929489, + 38.91700239924426 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Union Station", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.00741429219985, + 38.89776603923524 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Congress Heights", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.98851193260715, + 38.84565770287511 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Naylor Road", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.95626270945314, + 38.8513013835867 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Suitland", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.93187015895299, + 38.84396455441679 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Branch Ave", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.91146421773884, + 38.82644634832078 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Braddock Road", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05366757406264, + 38.81414366728901 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "King St - Old Town", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.06081120854599, + 38.806586117247996 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Eisenhower Ave", + "marker-color": "#ffff00", + "marker-symbol": "rail-metro", + "line": "yellow" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.07087438931458, + 38.800425449701244 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Huntington", + "marker-color": "#ffff00", + "marker-symbol": "rail-metro", + "line": "yellow" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.075205789149, + 38.793915852906736 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Anacostia", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.99537073875437, + 38.862963116801595 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Eastern Market", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.99600112671642, + 38.884622260842676 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Potomac Ave", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.98549531965503, + 38.88126327363317 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Stadium Armory", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.97708890144222, + 38.88670908984284 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Rhode Island Ave", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.9959369166641, + 38.921059689186336 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Minnesota Ave", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.94674773364017, + 38.89919122308901 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Van Ness-UDC", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.06298618051905, + 38.94326528832245 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Cleveland Park", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05804251913345, + 38.93476289080542 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Columbia Heights", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.03255211771173, + 38.9278379675233 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "College Park-U of Md", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.92812498187074, + 38.97863363396686 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Capitol Heights", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.91180811452222, + 38.889465856872334 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Morgan Boulevard", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.86807476813904, + 38.89383492821474 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Georgia Ave Petworth", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02346090408138, + 38.93743463014478 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Takoma", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.01817669871063, + 38.97607853106706 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Glenmont", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05355735935977, + 39.06178376553033 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Wheaton", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05010705352652, + 39.03752714367442 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Forest Glen", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.04291655489614, + 39.01495427527835 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Silver Spring", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.03101782681891, + 38.99394937476845 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Brookland-CUA", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.99453428510049, + 38.93321099135371 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Fort Totten", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.00220307680834, + 38.95184676758986 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Prince George's Plaza", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.95588150788183, + 38.96538544585582 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "West Hyattsville", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.9695766751036, + 38.955040170722334 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Benning Road", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.93836486812415, + 38.89097567600269 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Addison Road Seat Pleasant", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.89410791000809, + 38.886747816832674 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Deanwood", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.93525678304978, + 38.908178496517216 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "New Carrollton", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.87184128655672, + 38.94778485583298 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Landover", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.8911979676093, + 38.93350623445376 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Cheverly", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.91662804405367, + 38.916631854659755 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Largo Town Center", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.84203752022478, + 38.905068807210085 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "NoMa - Gallaudet U", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.00302044727623, + 38.9070162121509 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Rosslyn", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.07090868538504, + 38.89597909628309 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Arlington|Cemetery", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.06281012914037, + 38.88468685852292 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Dupont Circle", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.04341435972708, + 38.90959805757176 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Pentagon", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05371567343194, + 38.869462701258364 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Crystal City", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05028980970857, + 38.857904320437974 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Navy Yard - Ballpark", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.00508565136944, + 38.87648108490679 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "McPherson Sq", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.03363417212512, + 38.90133279688736 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Shaw-Howard Univ", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02191170078564, + 38.91347687116465 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Southern Ave", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.97505413887284, + 38.841085780329024 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Greenbelt", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -76.91105757313493, + 39.01114586051427 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Tenleytown-AU", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.07958732553253, + 38.94885143514487 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "West Falls Church VT/UVA", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.18909482259758, + 38.90078055103285 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Dunn Loring Merrifield", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.22716067211516, + 38.88362513595476 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Vienna Fairfax-GMU", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.27262225692775, + 38.877601123856635 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Friendship Heights", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.08499580503951, + 38.959483873675715 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Shady Grove", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.16462733437842, + 39.11992732498129 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Rockville", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.14612533928484, + 39.084321607556745 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Twinbrook", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.12081795176874, + 39.06246765170041 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "White Flint", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.1128298590364, + 39.04815135732502 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Grosvenor-Strathmore", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.10384972001367, + 39.02926895002534 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Medical Center", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.09695229054405, + 39.00005648434642 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Bethesda", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.09412919222653, + 38.984393660394474 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Foggy Bottom GWU", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05027773906102, + 38.900698009227014 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Court House", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.0871312310518, + 38.89017553121852 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Clarendon", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.09539409835607, + 38.886704839074675 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "East Falls Church", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.15688301999151, + 38.88595316637261 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Virginia Square-GMU", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.10297729421117, + 38.88336615180341 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Ballston-MU", + "marker-color": "#ffa500", + "marker-symbol": "rail-metro", + "line": "orange" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.11316883505587, + 38.882182873810734 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Farragut West", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.0406954151549, + 38.90131289417984 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Farragut North", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.03970082724703, + 38.90320194626843 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Woodley Park-Zoo Adams Morgan", + "marker-color": "#ff0000", + "marker-symbol": "rail-metro", + "line": "red" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05241802079871, + 38.92508513710051 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "L'Enfant Plaza", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02190848409535, + 38.88483772791197 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Smithsonian", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02806623428602, + 38.888018702051426 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Pentagon City", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.05953892154457, + 38.86188238675449 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Federal Triangle", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02813199840536, + 38.89318087185462 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Archives-Navy Mem'l", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.02191438799919, + 38.89366522352208 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Waterfront", + "marker-color": "#008000", + "marker-symbol": "rail-metro", + "line": "green" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.01750520880347, + 38.87646186689611 + ] + } + }, + { + "type": "Feature", + "properties": { + "name": "Ronald Reagan Washington National Airport", + "marker-color": "#0000ff", + "marker-symbol": "rail-metro", + "line": "blue" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -77.04404229438322, + 38.85341638599062 + ] + } + } + ] +} diff --git a/leafletMapWithSimpleMarker/leafletMapWithSingleMarker.html b/leafletMapWithSimpleMarker/leafletMapWithSingleMarker.html new file mode 100644 index 0000000..038a15b --- /dev/null +++ b/leafletMapWithSimpleMarker/leafletMapWithSingleMarker.html @@ -0,0 +1,22 @@ + + + + Simple Leaflet Map + + + + +
+ + + + + +