Shifted point anchors to be on top of portals
This commit is contained in:
parent
d008e37200
commit
bac7ef7d22
@ -37,18 +37,24 @@ window.plugin.overlayKML.loadExternals = function() {
|
|||||||
window.plugin.overlayKML.load();
|
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() {
|
window.plugin.overlayKML.load = function() {
|
||||||
// Provide popup window allow user to select KML to overlay
|
// Provide popup window allow user to select KML to overlay
|
||||||
|
|
||||||
|
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.LABEL = 'O';
|
||||||
L.Control.fileLayerLoad({
|
L.Control.fileLayerLoad({
|
||||||
fitBounds: true,
|
fitBounds: true,
|
||||||
layerOptions: {
|
layerOptions: {
|
||||||
pointToLayer: function (data, latlng) {
|
pointToLayer: function (data, latlng) {
|
||||||
return L.marker(latlng);
|
return L.marker(latlng, {icon: KMLIcon});
|
||||||
}},
|
}},
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user