當前位置: 首頁>>代碼示例>>PHP>>正文


PHP map::layers_js方法代碼示例

本文整理匯總了PHP中map::layers_js方法的典型用法代碼示例。如果您正苦於以下問題:PHP map::layers_js方法的具體用法?PHP map::layers_js怎麽用?PHP map::layers_js使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在map的用法示例。


在下文中一共展示了map::layers_js方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

		markers = null;
	}
	
	// Now initialise the map
	var options = {
	units: "m"
	, numZoomLevels: 16
	, controls:[],
	projection: proj_900913,
	'displayProjection': proj_4326
	};
	
	map = new OpenLayers.Map('ReporterMap', options);
	
	<?php 
echo map::layers_js(FALSE);
?>
	map.addLayers(<?php 
echo map::layers_array(FALSE);
?>
);
	
	map.addControl(new OpenLayers.Control.Navigation());
	map.addControl(new OpenLayers.Control.PanZoom());
	map.addControl(new OpenLayers.Control.MousePosition());
	map.addControl(new OpenLayers.Control.LayerSwitcher());
	
	// Create the markers layer
	markers = new OpenLayers.Layer.Markers("Markers");
	map.addLayer(markers);
	
開發者ID:kh411d,項目名稱:Ushahidi_Web,代碼行數:30,代碼來源:reporters_js.php

示例2: function

				, units: "m"
				, projection: MapProj
				, 'displayProjection': DispProj
				, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)
				, controls: [	new OpenLayers.Control.Navigation(),
													new OpenLayers.Control.MouseDefaults(),
													new OpenLayers.Control.PanZoom(),
													new OpenLayers.Control.ArgParser(),
													new OpenLayers.Control.MousePosition(),
													new OpenLayers.Control.LoadingPanel({minSize: new OpenLayers.Size(573, 366)}) ]
										};
				
				var map = new OpenLayers.Map('map', options);
				
				<?php 
echo map::layers_js(TRUE);
?>
				map.addLayers(<?php 
echo map::layers_array(TRUE);
?>
);
				
				
				// Transform feature point coordinate to Spherical Mercator
				preFeatureInsert = function(feature) {		
					var point = new OpenLayers.Geometry.Point(feature.geometry.x, feature.geometry.y);
					OpenLayers.Projection.transform(point, DispProj, MapProj);
				};
				
				
				// Create the markers layer
開發者ID:huslage,項目名稱:Ushahidi_Web,代碼行數:31,代碼來源:settings_js.php

示例3:

			*/
			var options = {
				units: "mi",
				numZoomLevels: 20,
				controls:[],
				projection: proj_900913,
				'displayProjection': proj_4326,
				eventListeners: {
						"zoomend": mapMove
				    },
				'theme': null
				};
			map = new OpenLayers.Map('map', options);
			map.addControl( new OpenLayers.Control.LoadingPanel({minSize: new OpenLayers.Size(573, 366)}) );
			
			<?php echo map::layers_js(TRUE); ?>
			map.addLayers(<?php echo map::layers_array(TRUE); ?>);
			
			
			// Add Controls
			map.addControl(new OpenLayers.Control.Navigation());
			map.addControl(new OpenLayers.Control.Attribution());
			map.addControl(new OpenLayers.Control.PanZoomBar());
			map.addControl(new OpenLayers.Control.MousePosition(
				{
					div: document.getElementById('mapMousePosition'),
					numdigits: 5
				}));    
			map.addControl(new OpenLayers.Control.Scale('mapScale'));
            map.addControl(new OpenLayers.Control.ScaleLine());
			map.addControl(new OpenLayers.Control.LayerSwitcher());
開發者ID:rindou240,項目名稱:Ushahidi_Web,代碼行數:31,代碼來源:big_mapview_js.php

示例4:

			*/
			var options = {
				units: "mi",
				numZoomLevels: 18,
				controls:[],
				projection: proj_900913,
				'displayProjection': proj_4326,
				eventListeners: {
						"zoomend": mapMove
				    },
				'theme': null
				};
			map = new OpenLayers.Map('map', options);
			map.addControl( new OpenLayers.Control.LoadingPanel({minSize: new OpenLayers.Size(573, 366)}) );
			
			<?php echo map::layers_js(FALSE); ?>
			map.addLayers(<?php echo map::layers_array(FALSE); ?>);
			
			
			// Add Controls
			map.addControl(new OpenLayers.Control.Navigation());
			map.addControl(new OpenLayers.Control.Attribution());
			map.addControl(new OpenLayers.Control.PanZoomBar());
			map.addControl(new OpenLayers.Control.MousePosition(
				{
					div: document.getElementById('mapMousePosition'),
					numdigits: 5
				}));    
			map.addControl(new OpenLayers.Control.Scale('mapScale'));
            map.addControl(new OpenLayers.Control.ScaleLine());
			map.addControl(new OpenLayers.Control.LayerSwitcher());
開發者ID:nurous,項目名稱:bushfireconnect,代碼行數:31,代碼來源:main_js.php


注:本文中的map::layers_js方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。