//point style
var myIcon = L.icon({
iconUrl: 'css/images/dian.svg',
// shadowUrl: 'css/images/leaf-shadow.png',
iconSize: [50, 50], // size of the icon
// shadowSize: [50, 64], // size of the shadow
iconAnchor: [10, 50], // point of the icon which will correspond to marker's location
// shadowAnchor: [4, 62], // the same for the shadow
// popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});
//样式设定
var vectorTileStyling = {
//layer样式,line没有fill属性
gj:{//layername
weight: 1,
color: '#cf52d3',
opacity: 0.6
},
//使用自定义icon
// point:{//layername
//
// weight: 1,
// icon: myIcon//自定义icon
// },
//点
//方法一
point:{//layername
weight: 2,
color: 'red',
opacity: 1,
fillColor: 'yellow',
fill: true,
radius: 6,
fillOpacity: 0.7
},
//方法二
// point: function(properties, zoom) {
// return {
// weight: 2,
// color: 'red',
// opacity: 1,
// fillColor: 'yellow',
// fill: true,
// radius: 6,
// fillOpacity: 0.7
// }
// },
//线
line:{//layername
weight:1,
color: '#f2b648',//颜色
fillColor: 'red',
fillOpacity:0,//填充透明度
dashArray: '5' //设置虚线
},
//面
polygon:{//layername
weight: 1,//边线宽度
fillColor: '#53e033',//填充颜色
color: 'red',//边线颜色
fill: true,
fillOpacity: 0.2,//填充颜色透明度
opacity: 0.4,//边线颜色透明度
}
};
//vector tile pointpbflayer
var pointUrl = "http://127.0.0.1:8080/geoserver/gwc/service/tms/1.0.0/test:point@EPSG:4326@pbf/{z}/{x}/{-y}.pbf";
var pointVectorTileOptions = {
rendererFactory: L.canvas.tile,
vectorTileLayerStyles: vectorTileStyling,
interactive: true, // Make sure that this VectorGrid fires mouse/pointer events
getFeatureId: function(f) {
// console.log("getFeatureId:"+f.properties.ID);
return f.properties.ID;
}
};
}).addTo(map);

最新文章

  1. Open source packages on self-driving car
  2. MVC路由约束
  3. Spring学习总结四——SpringIOC容器四
  4. 20145102 《Java程序设计》第1周学习总结
  5. node开子线程模块--tagg2
  6. 1)③爬取网易It方面部分新闻
  7. table固定宽度高度, 及overflow省略号
  8. solr8.0 从数据库导入数据(三)
  9. Session Cookie介绍和使用
  10. 网络协议 2 - IP 是怎么来,又是怎么没的?
  11. springmvc 项目完整示例02 项目创建-eclipse创建动态web项目 配置文件 junit单元测试
  12. Robot Framework脚本在jenkins执行完之后无法查看日志
  13. 谷歌技术"三宝"之GFS
  14. spring-数据库操作组件的实现
  15. Java并发编程的艺术(九)——批量获取多条线程的执行结果
  16. Ubuntu下安装LXC手记之centos
  17. DIOCP3-关于TIOCPConsole和编码解码器
  18. DDMS
  19. Hdu3223 Decrypt Messages
  20. vue实现对数据的增删改查(CURD)

热门文章

  1. 查询处理Oracle锁表的问题
  2. 数据挖掘竞赛kaggle初战——泰坦尼克号生还预测
  3. 《Python编程从0到1》笔记5——图解递归你肯定看完就能懂!
  4. 解决reportNG中文乱码(转:http://www.it610.com/article/3626590.htm)
  5. Educational Codeforces Round 64 -C(二分)
  6. Spring数据库主从分离
  7. 小记---------手动执行脚本正常执行,使用crontab定时执行时 不执行
  8. 在html中展示pdf
  9. h5与app混合开发,jsbridge
  10. java gRPC四种服务类型简单示例