Skip to content

Instantly share code, notes, and snippets.

@bsudekum
Created September 23, 2013 21:48
Show Gist options
  • Save bsudekum/6677438 to your computer and use it in GitHub Desktop.
Save bsudekum/6677438 to your computer and use it in GitHub Desktop.
$.getJSON($('link[rel="points"]').attr("href"), function(data) {
var geojson = L.geoJson(data, {
onEachFeature: function (feature, layer) {
layer.bindPopup("AFDB Project Site");
}
});
//Initializing the map to start at the east coast
var map = L.map('map', {
scrollWheelZoom: false,
touchZoom: false
}).fitBounds(geojson.getBounds()); //.setView([9.145, 40.489673], 6);
//Add Basemap
L.tileLayer('http://a.tiles.mapbox.com/v3/spatialdev.map-hozgh18d/{z}/{x}/{y}.png', {
attribution: '<a href="http://www.mapbox.com/about/maps/">Map Terms & Feedback</a>'
}).addTo(map);
var topPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane);
var markerPane = map._createPane('leaflet-marker-pane', map.getPanes().mapPane);
var overlayPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane);
var midLayer = L.esri.dynamicMapLayer("http://dev.harvestchoice.org/arcgis/rest/services/gatesesp/GeneralContext/MapServer", {
opacity : 0.6,
layers:[2],
}).addTo(map);;
var markerLayer = geojson.addTo(map);
var topPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane);
var topLayer = L.tileLayer('http://a.tiles.mapbox.com/v3/landplanner.map-6ycmi90w/{z}/{x}/{y}.png').addTo(map);
topPane.appendChild(topLayer.getContainer());
topLayer.setZIndex(5);
markerLayer.setZIndex(4);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment