Shifted point anchors to be on top of portals
This commit is contained in:
parent
d008e37200
commit
bac7ef7d22
@ -37,20 +37,26 @@ window.plugin.overlayKML.loadExternals = function() {
|
||||
window.plugin.overlayKML.load();
|
||||
}
|
||||
|
||||
// window.plugin.overlayKML.setupCallback = function() {
|
||||
// $('#toolbox').append(' <a onclick="window.plugin.overlayKML.load()" title="Load KML to overlay on top of Ingress Intel Map">Overlay KML</a>');
|
||||
// }
|
||||
|
||||
window.plugin.overlayKML.load = function() {
|
||||
// Provide popup window allow user to select KML to overlay
|
||||
L.Control.FileLayerLoad.LABEL = 'O';
|
||||
L.Control.fileLayerLoad({
|
||||
|
||||
L.Icon.Default.imagePath = '@@INCLUDEIMAGE:images/marker-icon.png@@';
|
||||
var KMLIcon = L.icon({
|
||||
iconUrl: '@@INCLUDEIMAGE:images/marker-icon.png@@',
|
||||
|
||||
iconSize: [16, 24], // size of the icon
|
||||
iconAnchor: [8, 24], // point of the icon which will correspond to marker's location
|
||||
popupAnchor: [-3, 16] // point from which the popup should open relative to the iconAnchor
|
||||
});
|
||||
|
||||
L.Control.FileLayerLoad.LABEL = 'O';
|
||||
L.Control.fileLayerLoad({
|
||||
fitBounds: true,
|
||||
layerOptions: {
|
||||
pointToLayer: function (data, latlng) {
|
||||
return L.marker(latlng);
|
||||
return L.marker(latlng, {icon: KMLIcon});
|
||||
}},
|
||||
}).addTo(map);
|
||||
}).addTo(map);
|
||||
}
|
||||
|
||||
var setup = function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user