[Mapbender-commits] r7323 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Dec 17 02:07:55 EST 2010


Author: armin11
Date: 2010-12-16 23:07:55 -0800 (Thu, 16 Dec 2010)
New Revision: 7323

Modified:
   trunk/mapbender/http/php/mod_wmc2ol.php
Log:
Some Bugfixes

Modified: trunk/mapbender/http/php/mod_wmc2ol.php
===================================================================
--- trunk/mapbender/http/php/mod_wmc2ol.php	2010-12-16 16:22:14 UTC (rev 7322)
+++ trunk/mapbender/http/php/mod_wmc2ol.php	2010-12-17 07:07:55 UTC (rev 7323)
@@ -458,11 +458,12 @@
 			$html.="		maxScale: ".$maxScale.",\n"; 
 			$html.="		'isBaseLayer': false\n";
                 	$html.="	} );\n";
-			$html.="	layer".$i.".alwaysInRange = true;\n";
+			$html.="	layer".$i.".alwaysInRange = true;\n"; //TODO: there is a problem with calculating the scale hints - therefor this is only a workaround - must be fixed!
           		$html.="	map.addLayer(layer".$i.");\n";
 		}
 	}
 	$html.="\n";
+	$html.="	markers.alwaysInRange = true;\n";
 	$html.="	map.addLayer(markers);\n";
 	if(isset($_REQUEST["LayerSwitcher"]) && $_REQUEST["LayerSwitcher"] == '1'){
         	$html.="	map.addControl(new OpenLayers.Control.LayerSwitcher());\n";
@@ -508,7 +509,7 @@
 			$html.="	});\n";
 			//end of definition of the point vector layer 
 			//push the features to the layer
-			
+			$html.="	pointVectorLayer.alwaysInRange = true;\n";
 			$html.="	map.addLayer(pointVectorLayer);\n";
 			$html.="	pointVectorLayer.addFeatures(createFeaturesFromGeoRSS());\n";
 			//define the controls for the features in the point vector layer
@@ -619,7 +620,7 @@
 					
     						$html.="	var point = new OpenLayers.Geometry.Point(";
 						$html.="".$coords[0].",".$coords[1].");\n";
-						$html.="	pointFeatures[".$i."] = new OpenLayers.Feature.Vector(point, {title: \"".$georssXml->entry[$i]->title."\", description : \"".str_replace("\"", "'",$georssXml->entry[$i]->content)."\", link : \"".$georssXml->entry[$i]->link."\"});\n";	
+						$html.="	pointFeatures[".$i."] = new OpenLayers.Feature.Vector(point, {title: \"".$georssXml->entry[$i]->title."\", description : \"".str_replace("\"", "'",$georssXml->entry[$i]->content)."\", link : \"".$georssXml->entry[$i]->link->attributes()->href."\"});\n";	
 					}
 					$html.="	return pointFeatures;\n"; 
         				$html.="}\n"; 
@@ -643,7 +644,7 @@
 					
     						$html.="	var point = new OpenLayers.Geometry.Point(";
 						$html.="".$coords[0].",".$coords[1].");\n";
-						$html.="	pointFeatures[".$i."] = new OpenLayers.Feature.Vector(point, {title: \"".$georssXml->entry[$i]->title."\", description : \"".str_replace("\"", "'",$georssXml->entry[$i]->content)."\", link : \"".$georssXml->entry[$i]->id."\"});\n";	
+						$html.="	pointFeatures[".$i."] = new OpenLayers.Feature.Vector(point, {title: \"".$georssXml->entry[$i]->title."\", description : \"".str_replace("\"", "'",$georssXml->entry[$i]->content)."\", link : \"".$georssXml->entry[$i]->link->attributes()->href."\"});\n";	
 					}
 					//***Generate Dummy Point for testing
 					$html.="	var point = new OpenLayers.Geometry.Point(2594468.92,5530693.03);\n";



More information about the Mapbender_commits mailing list