本文整理汇总了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);
示例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
示例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());
示例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());