-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for alternative control position
- Loading branch information
1 parent
756dc8e
commit acbaf47
Showing
1 changed file
with
35 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Leaflet Control Geocoder</title> | ||
|
||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | ||
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /><![endif]--> | ||
<link rel="stylesheet" href="../Control.Geocoder.css" /> | ||
|
||
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet-src.js"></script> | ||
<script src="../Control.Geocoder.js"></script> | ||
<style type="text/css"> | ||
body { | ||
margin: 0; | ||
} | ||
#map { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
|
||
<script type="text/javascript"> | ||
var map = L.map('map').setView([0, 0], 2); | ||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { | ||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' | ||
}).addTo(map); | ||
L.control.scale({position:'topleft'}).addTo(map); | ||
L.Control.geocoder({position:'topleft', showResultIcons:true}).addTo(map); | ||
</script> | ||
</body> | ||
</html> |