leaflet

Call function in function event (onChange), from Select created in Leaflet and Vue.js

依然范特西╮ 提交于 2020-08-15 10:39:45
问题 I am making a app in Vue.js and Leaflet. In this app, I have a Select in leaflet created with L.DomUtil this.select = L.DomUtil.create('select','leaflet-countryselect',this.div); I do not find the way for put 'v-on:change' in this 'Select', so, I have to call a event function, inside to a Function Method in Vue.js. methods: { firstFunction{ }, secondFunction() { this.select.on('change', function(e){ this.firstFunction() } } } But it not working, the error is "this.firstFunction() is not a

leaflet跨地图打点--学习记录

[亡魂溺海] 提交于 2020-08-13 06:12:36
leaflet跨地图打点–学习记录 遇到相同问题的可以拿来参考。 做项目遇到问题,需要多个地图打点。如果这样添加一个点会默认添加到中间地图。 < script > /** * 智图地图内容 */ var normalmRight2 = L . tileLayer . chinaProvider ( 'Geoq.Normal.PurplishBlue' , { maxZoom : 18 , minZoom : 1 } ) ; var map = L . map ( "map" , { center : [ 15.59 , 220.29 ] , zoom : 2 , layers : [ normalmRight2 ] , zoomControl : false } ) ; var greenIcon = L . icon ( { iconUrl : 'images/114dns.png' , iconSize : [ 20 , 20 ] , // 图标的大小 【值1,值2】 为具体你自定义图标的尺寸,比如我图标尺寸是32×52,表示该图标:宽度32像素,高度:52像素,那么值1:就是32,值2:就是52 //shadowSize: [35, 35], // 影子的大小 【值1,值2】 为具体你自定义阴影图标的尺寸,比如我图标尺寸是41×41,表示该图标:宽度41像素,高度:41像素