[Mapbender-commits] r8874 - trunk/mapbender/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri May 16 01:43:10 PDT 2014


Author: hwbllmnn
Date: 2014-05-16 01:43:10 -0700 (Fri, 16 May 2014)
New Revision: 8874

Modified:
   trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
Log:
fixed digitizing (needed transformation back to wgs84)


Modified: trunk/mapbender/lib/mb.ui.displayKmlFeatures.js
===================================================================
--- trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-05-16 08:36:58 UTC (rev 8873)
+++ trunk/mapbender/lib/mb.ui.displayKmlFeatures.js	2014-05-16 08:43:10 UTC (rev 8874)
@@ -172,20 +172,11 @@
         var tp = pts.closedPolygon ? geomType.polygon : (pts.closedLine ? geomType.line : geomType.point);
         var itm = this._kmls[url];
 
-        for(var i in itm.highlightArray){
-            itm.highlightArray[i].hide();
-        }
-
-        var h = new Highlight([self.element.attr('id')], "mapframe1_" + parseInt(Math.random()*100000,10),{
-            "position":"absolute",
-            "top": "0px",
-            "left": "0px",
-            "z-index": "80" },1);
-
         var geom = new Geometry();
         var multi = new MultiGeometry(tp);
-        for(i = 0; i < pts.length; ++i) {
-            geom.addPoint(pts[i].pos);
+        for(var i = 0; i < pts.length; ++i) {
+            var pt = Proj4js.transform(this.targetProj, this.wgs84, pts[i].pos);
+            geom.addPoint(pt);
         }
         geom.geomType = tp;
         multi.add(geom);
@@ -206,7 +197,6 @@
             multi.e.setElement("Mapbender:iconOffsetY", -34);
             multi.e.setElement("Mapbender:icon","../img/marker/red.png");
         }
-        h.add(geom);
 
         itm.data.features.push(JSON.parse(multi.toString()));
         this.element.trigger('kml:loaded',{type:"geojson",data:itm.data,url:itm.url,display: itm.display, refreshing: true});



More information about the Mapbender_commits mailing list