Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ho3ein-mola/bee5ac43ffd1d75eadf59765cddeb368 to your computer and use it in GitHub Desktop.
Save ho3ein-mola/bee5ac43ffd1d75eadf59765cddeb368 to your computer and use it in GitHub Desktop.
استفاده از leaflet با openstreet
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<head>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<style type="text/css">
#mapid { height: 400px; }
</style>
</head>
<body>
<div id="mapid"></div>
<script type="text/javascript">
var mymap = L.map('mapid').setView([36.288050, 59.615325], 15);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(mymap);
var marker = L.marker([36.288050, 59.615325]).addTo(mymap);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment