本文整理匯總了TypeScript中leaflet.geoJson函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript geoJson函數的具體用法?TypeScript geoJson怎麽用?TypeScript geoJson使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了geoJson函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: processMarkerLayer
function processMarkerLayer(response) {
var markerLayerHandlers = {
onEachFeature: markerLayerOnEachFeatureFunction
};
var layer = L.geoJson(response, markerLayerHandlers);
layer.addTo(map);
}
示例2: successCallback
$http.get(url).success(function successCallback(data) {
var handlers = {
style: handlerFactories.style(args),
pointToLayer: handlerFactories.pointToLayer(args),
onEachFeature: handlerFactories.onEachFeature(args)
};
var geojson = L.geoJson(data, handlers);
geojson.addTo(map);
overlays[name] = geojson;
layerControl.addOverlay(geojson, name);
});
示例3: createDistricts
createDistricts() {
function style(feature) {
return {
// fillColor: 'rgb(22,55,878)',
weight: 2,
// opacity: 1,
color: 'white',
dashArray: '3',
// fillOpacity: 0.7
};
}
geojson = L.geoJson(this._mapService.ukraine_arr, {
style: style,
onEachFeature: this.onEachFeature
}).addTo(map);
}
示例4: layerGenerator
function layerGenerator(event, facData) {
var geoJsonLayer = L.geoJson(facData, {
onEachFeature: onEachFeature,
pointToLayer: function (feature, latlng) {
let style = myStyle;
style.fillColor = feature.properties.shaking.alert_level;
return L.circleMarker(latlng, myStyle);
}
});
const facilityCluster = L.markerClusterGroup({
iconCreateFunction: createFacCluster
})
facilityCluster.addLayer(geoJsonLayer);
return facilityCluster;
}