当前位置: 首页>>代码示例>>PHP>>正文


PHP map::layers_array方法代码示例

本文整理汇总了PHP中map::layers_array方法的典型用法代码示例。如果您正苦于以下问题:PHP map::layers_array方法的具体用法?PHP map::layers_array怎么用?PHP map::layers_array使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在map的用法示例。


在下文中一共展示了map::layers_array方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

	// 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);
	
	// create a lat/lon object
	var latitude, longitude;
	if ($("#latitude").val() != "" && $("#longitude").val() != "") {
开发者ID:kh411d,项目名称:Ushahidi_Web,代码行数:31,代码来源:reporters_js.php

示例2: function

				, 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
				markers = new OpenLayers.Layer.Markers("Markers", {
					preFeatureInsert:preFeatureInsert,
					projection: DispProj
开发者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,代码行数:30,代码来源: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,代码行数:30,代码来源:main_js.php


注:本文中的map::layers_array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。