Leaflet AJAX
HTML
<script src="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.css">
<select id="IDselect">
<option value="">--select--</option>
<option value="all">show all</option>
</select>
<div id="mymap" style="width:700px;height:600px;"></div>
JavaScript
var map;
var geojsonlayer;
var bundlelayer;
var center = [44.12308489306967, -120.684814453125];
function initmap() {
// create the Esri Gray layer
var grayMapUrl = 'http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}';
var grayMapLayer = new L.TileLayer(grayMapUrl, {
maxZoom: 19,
attribution: 'Tiles: © Esri'
});
var esriAerialUrl = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}';
var esriAerialLayer = new L.TileLayer(esriAerialUrl, {
maxZoom: 19,
attribution: 'Tiles: © Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, and the GIS User Community'
});
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmLayer = new L.TileLayer(osmUrl, {
maxZoom: 19,
attribution: 'Map data © OpenStreetMap contributors'
});
var stamenTerrainUrl = 'http://tile.stamen.com/terrain/{z}/{x}/{y}.png';
var stamenTerrainLayer = new L.TileLayer(stamenTerrainUrl, {
maxZoom: 19,
attribution: [
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ',
'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, ',
'under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'].join("")
});
var basemaps = {
"ESRI Gray": grayMapLayer,
"ESRI Aerial": esriAerialLayer,
"Open Street Map": osmLayer,
"Stamen Terrain": stamenTerrainLayer
};
mapoptions = {
layers: [grayMapLayer]
};
map = new L.Map('mymap', mapoptions);
// set the map's starting view
map.setView(new L.LatLng(center[0], center[1]), 6);
L.control.layers(basemaps).addTo(map);
}
function onEachFeature(feature, layer) {
if...