参考官网例子,做一个随比例一起缩放的矢量符号的例子,主要代码如下:
<script type="text/javascript">
var map;
function init() {
var options = {
controls: [],
maxResolution: "auto"
};
map = new OpenLayers.Map("map", options);
var wms = new OpenLayers.Layer.WMS("WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: 'basic' });
map.addLayer(wms);
// 初始化空间
map.addControl(new OpenLayers.Control.ZoomPanel());
map.addControl(new OpenLayers.Control.Navigation());
map.addControl(new OpenLayers.Control.MousePosition());
var renderer = OpenLayers.Util.getParameters(window.locati