Added clickable folder icon

This commit is contained in:
Nihal Mirpuri 2013-09-24 23:10:49 +10:00
parent 1632166a78
commit 39ea0a4a85

View File

@ -42,16 +42,14 @@ window.plugin.overlayKML.load = function() {
L.Icon.Default.imagePath = '@@INCLUDEIMAGE:images/marker-icon.png@@'; L.Icon.Default.imagePath = '@@INCLUDEIMAGE:images/marker-icon.png@@';
var KMLIcon = L.icon({ var KMLIcon = L.icon({
iconUrl: '@@INCLUDEIMAGE:images/marker-icon.png@@';, iconUrl: '@@INCLUDEIMAGE:images/marker-icon.png@@',
iconSize: [16, 24], // size of the icon iconSize: [16, 24], // size of the icon
iconAnchor: [16, 8], // point of the icon which will correspond to marker's location iconAnchor: [16, 8], // 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 popupAnchor: [-3, 16] // point from which the popup should open relative to the iconAnchor
}); });
// Implementing a folder icon instead of default 'O' icon to open KML. Not yet useable L.Control.FileLayerLoad.LABEL = '<img src="@@INCLUDEIMAGE:images/open-folder-icon_sml.png@@" alt="Open" />';
// L.Control.FileLayerLoad.LABEL = '<img src="@@INCLUDEIMAGE:images/open-folder-icon_sml.png@@" alt="Open" />';
L.Control.FileLayerLoad.LABEL = 'O';
L.Control.fileLayerLoad({ L.Control.fileLayerLoad({
fitBounds: true, fitBounds: true,
layerOptions: { layerOptions: {