[Mapbender-commits] r8672 - branches/2.7/http/javascripts trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jul 16 04:08:58 PDT 2013


Author: verenadiewald
Date: 2013-07-16 04:08:58 -0700 (Tue, 16 Jul 2013)
New Revision: 8672

Modified:
   branches/2.7/http/javascripts/geometry.js
   trunk/mapbender/http/javascripts/geometry.js
Log:
if Raphael.js is used for highlighting geometries, don't use calculateVisibleDashes in function drawGeometry, because svg is not shown correctly then in the map

Modified: branches/2.7/http/javascripts/geometry.js
===================================================================
--- branches/2.7/http/javascripts/geometry.js	2013-07-16 10:46:36 UTC (rev 8671)
+++ branches/2.7/http/javascripts/geometry.js	2013-07-16 11:08:58 UTC (rev 8672)
@@ -1840,7 +1840,11 @@
 						(function(){
 							var currentPoint = realToMap(mapframe, currentGeom.get(j));
 							
-							var pq = calculateVisibleDash(previousPoint, currentPoint, mapframeWidth, mapframeHeight);
+							//don't use calculateVisibleDash here anymore, because Raphael svg is drawn not correctly when shown in the corner of the map
+							//var pq = calculateVisibleDash(previousPoint, currentPoint, mapframeWidth, mapframeHeight);
+							var pq = [];
+							pq[0] = new Mapbender.Point(previousPoint);
+							pq[1] = new Mapbender.Point(currentPoint);
 							if (pq) {
 								if (segment === "") {
 									segment += "M" + pq[0].x + " " + pq[0].y;

Modified: trunk/mapbender/http/javascripts/geometry.js
===================================================================
--- trunk/mapbender/http/javascripts/geometry.js	2013-07-16 10:46:36 UTC (rev 8671)
+++ trunk/mapbender/http/javascripts/geometry.js	2013-07-16 11:08:58 UTC (rev 8672)
@@ -1840,7 +1840,12 @@
 						(function(){
 							var currentPoint = realToMap(mapframe, currentGeom.get(j));
 							
-							var pq = calculateVisibleDash(previousPoint, currentPoint, mapframeWidth, mapframeHeight);
+							//don't use calculateVisibleDash here anymore, because Raphael svg is drawn not correctly when shown in the corner of the map
+							//var pq = calculateVisibleDash(previousPoint, currentPoint, mapframeWidth, mapframeHeight);
+							var pq = [];
+							pq[0] = new Mapbender.Point(previousPoint);
+							pq[1] = new Mapbender.Point(currentPoint);
+							
 							if (pq) {
 								if (segment === "") {
 									segment += "M" + pq[0].x + " " + pq[0].y;



More information about the Mapbender_commits mailing list