[Mapbender-commits] r8977 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jul 2 07:33:14 PDT 2014
Author: hwbllmnn
Date: 2014-07-02 07:33:14 -0700 (Wed, 02 Jul 2014)
New Revision: 8977
Modified:
trunk/mapbender/http/plugins/kmlTree.js
Log:
made select features button a mapbender button to solve interference problems
Modified: trunk/mapbender/http/plugins/kmlTree.js
===================================================================
--- trunk/mapbender/http/plugins/kmlTree.js 2014-07-02 14:19:28 UTC (rev 8976)
+++ trunk/mapbender/http/plugins/kmlTree.js 2014-07-02 14:33:14 UTC (rev 8977)
@@ -74,7 +74,7 @@
$addButton = $('<button class="add" name="addkml" value="addkml"></button>');
- var selectButton = $('<button class="digitize-image digitize-cursor"></button>');
+ var selectButton = $('<img id="toggle-select-features" src="../img/osgeo_graphics/geosilk/cursor.png"></img>');
$addButton.click(function(){
var dlg = $('<div ></div>').dialog({
@@ -189,12 +189,19 @@
$KMLfolder.find('ul').before(selectButton);
$KMLfolder.find("ul").before($addButton);
- selectButton.bind('click', function() {
- var kml = $('#mapframe1').data('kml');
- if(kml.getQueriedLayer) {
+ var btn = new Mapbender.Button({
+ domElement: selectButton[0],
+ over: '../img/osgeo_graphics/geosilk/cursor_selected.png',
+ on: '../img/osgeo_graphics/geosilk/cursor_selected.png',
+ off: '../img/osgeo_graphics/geosilk/cursor.png',
+ name: 'toggle-select-features',
+ go: function() {
+ var kml = $('#mapframe1').data('kml');
+ kml.setQueriedLayer(true);
+ },
+ stop: function() {
+ var kml = $('#mapframe1').data('kml');
kml.setQueriedLayer(false);
- } else {
- kml.setQueriedLayer(true);
}
});
More information about the Mapbender_commits
mailing list