+ loadStaticMap()
This commit is contained in:
parent
5f4cdde7b4
commit
8eb32a7706
|
@ -25,6 +25,40 @@ function onEachFeature(feature, layer) {
|
|||
// $(this).addClass("active");
|
||||
// });
|
||||
|
||||
function loadStaticMap() {
|
||||
var base_map = L.tileLayer('http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
|
||||
maxZoom: 18
|
||||
});
|
||||
|
||||
var over_geojson_sjy_bound_2nd = new L.GeoJSON.AJAX("/json/sjy_bound_2nd.geojson", {
|
||||
style: {
|
||||
"color": "#de950d",
|
||||
"weight": 2,
|
||||
"opacity": 1,
|
||||
"fillOpacity": 0
|
||||
}
|
||||
});
|
||||
|
||||
var map = L.map('map', {
|
||||
layers: [
|
||||
base_map,
|
||||
over_geojson_sjy_bound_2nd
|
||||
],
|
||||
minZoom: 6,
|
||||
maxZoom: 17,
|
||||
zoomIn: 1,
|
||||
zoomOut: 1,
|
||||
zoomControl: false
|
||||
}).setView([34, 96], 6);
|
||||
|
||||
var bounds = new L.LatLngBounds(new L.LatLng(31, 103), new L.LatLng(38, 89));
|
||||
map.fitBounds(bounds);
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
map.invalidateSize();
|
||||
});
|
||||
}
|
||||
|
||||
function loadStationMap(station) {
|
||||
var base_map = L.tileLayer('http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
|
||||
maxZoom: 18
|
||||
|
|
Loading…
Reference in New Issue