Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c793dffa93
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (54 sloc) 2.859 kb
<!DOCTYPE html>
<meta charset="utf-8">
<title>Open Street Maps</title>
<meta name="description" content="Open Street Maps">
<meta name="viewport" content="width=device-width, initial-scacle=1.0"/>
<link rel="app-manifest" href="" />
<link rel="stylesheet" type="text/css" href="css/leaflet.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript">
var path = document.location.pathname;
var L_ROOT_URL = path.substr(0, path.indexOf('index.html', 1));
<script type="text/javascript" src="js/leaflet-src.js"></script>
<script type="text/javascript" src="js/mozapps.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<div id='buttons'>
<input type="text" id="txtSearch"/><button id="btnSearch">Find</button>
<button id='btnLocation'>location</button>
<div id="map"></div>
<script type="text/javascript">
var settings = {
lat: localStorage.getItem('lastLat') || 37.37779161,
lng: localStorage.getItem('lastLng') || -122.08110809,
zoom: localStorage.getItem('lastZoom') || 12 // this should be changed after zoom on the map will be changed
var map = new L.Map('map');
// create a CloudMade tile layer (or use other provider of your choice)
var cloudmade = new L.TileLayer('http://{s}{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="">OpenStreetMap</a> contributors, <a href="">CC-BY-SA</a>, Imagery © <a href="">CloudMade</a>',
maxZoom: 18
// add the CloudMade layer to the map set the view to a given center and zoom
map.addLayer(cloudmade).setView(new L.LatLng(, settings.lng), settings.zoom);
// keep track of the viewport the user last viewed
map.on('moveend', function(e) {
var pos = map.getBounds().getCenter();
localStorage.setItem('lastLng', pos.lng);
map.on('zoomend', function(zoom) {
var zoom = map.getZoom();
localStorage.setItem('lastZoom', zoom);
settings.zoom = zoom;
// attach a given HTML content to the marker and immediately open it
// marker.bindPopup("A pretty CSS3 popup.<br />Easily customizable.").openPopup();
Jump to Line
Something went wrong with that request. Please try again.