/**扩展OpenLayers.Map,将地图图层加载等操作封装在本对象中。
*
*/
Vgs.WebMap=OpenLayers.Class(OpenLayers.Map,{
initialize:function(div,options)
{
if(!options)options={};
options['controls']=[];
OpenLayers.Map.prototype.initialize.apply(this,[div,options]);
var extent = new OpenLayers.Bounds(-180,-90,180,90);
this.bounds=extent;
this.units="degree";
this.numZoomLevels=16;
this.maxResolution=(re1>re2?re1:re2);
this.maxExtent=extent;
this.restrictedExtent=extent;
this.div.oncontextmenu = function () { return false;};
var markerlyr= new OpenLayers.Layer.Markers(AppConfig.markerLyrName,{
displayInLayerSwitcher:false,
isBaseLayer: false
});
this.addLayer(markerlyr);
},
/**根据数组创建一个图层
*
* @param {} name 图层名称
* @param {} isBlyr 是否为基础图层
* @param {} visible 是否可见
* @param {} array 图层名称数组
* @param {} type 图层类型附加参数
* @return {}
*/
createALayer:function(name,isBlyr,visible,array,type)
{
if(!type||type.length<=0)type='o';
var templyr = new OpenLayers.Layer.WMS(
name,"./map/wmsproxy.jsp?mtype="+type,
{layers :array,format : "image/png",transparent: "true"}
,{isBaseLayer:isBlyr,visibility:visible}
);
return templyr;
},
CLASS_NAME:"Vgs.WebMap"
});
分享到:
相关推荐
openlayers.js库及入门事例; OpenLayers是一个开源的js框架,用于在您的浏览器中实现地图浏览的效果和基本的zoom,pan等功能。OpenLayers支持的地图来源包括了WMS,GoogleMap,KaMap,MSVirtualEarth等等,您也可以...
OpenLayers.mobile.debug.js
OpenLayers.2.10.Beginners.Guide (英文版) 非常好的OpenLayers的入门及工具书,强烈推荐
Packt.OpenLayers.3.x.Cookbook.2nd.Edition.2016.3.pdf
OpenLayers.debug.js
OpenLayers.2.10.Beginners.Guide原书pdf和书中所有代码
Packt.OpenLayers.2.10.Beginner's.Guide英文pdf電子檔
第3章:走进Openlayers.rar
OpenLayers最新源码,包含v6.2.1和v6.2.1-dist。Github下载太慢,放到这里,需要的朋友可以下载。
openlayers.zip
openlayers-map openlayers-map openlayers-map openlayers-map
作为实战中vue+openlayers+geoserver文章的资源文件
Heatmap热图,可以非常直观的呈现一些原本不易理解或表达的数据,比如密度、频率、温度等,改用区域和颜色这种更容易被人理解的方式来呈现。热图实际上是三维可视化的...
OpenLayers 2.10 Beginner's Guide Create, optimize, and deploy stunning cross-browser web maps with the OpenLayers JavaScript web-mapping library Erik Hazzard 要有点英文阅读能力,不错的open...
openlayers开发用到的js库.zip
2015_OpenLayers_3_入门教程详细版.docx 加 js 包
openlayer ol.js ol.css
关于openlayers开发的一个中文手册,供大家学习。
OpenLayers网站构建实用程序使用main的更新来更新站点要求您已安装和 。 当前,构建网站还需要所有openlayers。 # only once: clonegit clone -b build ... 这将从openlayers存储库的main分支中更新站点文档和示例。...