-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
17 additions
and
53 deletions.
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,65 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!-- Load plotly.js into the DOM --> | ||
<script src='https://cdn.plot.ly/plotly-latest.min.js'></script> | ||
<head> | ||
<title>Quick Start - Leaflet</title> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script> | ||
|
||
|
||
</head> | ||
|
||
<body> | ||
|
||
Hello there! | ||
|
||
<script src="get.js"></script> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" /> | ||
|
||
<div id='myDiv_a'><!-- Plotly chart will be drawn inside this DIV --></div> | ||
<div id='myDiv_b'><!-- Plotly chart will be drawn inside this DIV --></div> | ||
<div id="mapid"></div> | ||
<script src='https://cdn.plot.ly/plotly-latest.min.js'></script> | ||
|
||
<div id="mapid" style="width: 600px; height: 400px;"></div> | ||
<script> | ||
|
||
var mymap = L.map('mapid').setView([51.505, -0.09], 13); | ||
|
||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { | ||
maxZoom: 18, | ||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' + | ||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + | ||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', | ||
id: 'mapbox/streets-v11' | ||
}).addTo(mymap); | ||
|
||
L.marker([51.5, -0.09]).addTo(mymap) | ||
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup(); | ||
|
||
L.circle([51.508, -0.11], 500, { | ||
color: 'red', | ||
fillColor: '#f03', | ||
fillOpacity: 0.2 | ||
}).addTo(mymap).bindPopup("I am a circle."); | ||
|
||
L.polygon([ | ||
[51.509, -0.08], | ||
[51.503, -0.06], | ||
[51.51, -0.047] | ||
]).addTo(mymap).bindPopup("I am a polygon."); | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script> | ||
|
||
|
||
var popup = L.popup(); | ||
|
||
</head> | ||
<body> | ||
|
||
function onMapClick(e) { | ||
popup | ||
.setLatLng(e.latlng) | ||
.setContent("You clicked the map at " + e.latlng.toString()) | ||
.openOn(mymap); | ||
} | ||
|
||
mymap.on('click', onMapClick); | ||
<script src="get.js"></script> | ||
|
||
</script> | ||
<div id="mapid" style="width: 80%; height: 600px;"></div> | ||
|
||
</body> | ||
</body> | ||
</html> |