leaflet

leaflet: don't fire click event function on doubleclick

≯℡__Kan透↙ 提交于 2020-04-08 18:19:16
问题 I have a question concerning clicks on a map in leaflet. If I click on the map I want to set a marker there, but if doubleclick on the map I just want to zoom in without setting a marker. So I have the follwing code: var map = L.map(attrs.id, { center: [scope.lat, scope.lng], zoom: 14 }); var marker = L.marker([scope.lat, scope.lng],{draggable: true}); map.on('click', function(event){ marker.setLatLng(event.latlng); marker.addTo(map); }); The problem now is, when I doublclick on the map the

leaflet常用插件

你。 提交于 2020-04-07 14:44:13
1、常用地图切换加载(osm、google、baidu、gaode、tianditu.etc) https://github.com/htoooth/Leaflet.ChineseTmsProviders 2、切片地图加载(wmts)(支持矢量切片) https://github.com/mylen/leaflet.TileLayer.WMTS 3、wms地图服务加载 https://github.com/heigeo/leaflet.wms 4、视窗范围框定(只容许查看和编辑给定范围地图) https://github.com/aparshin/leaflet-boundary-canvas 5、地图要素显示比例尺控制(不同比例尺要素渲染)(根据屏幕坐标控制)(非常重要,常用) https://github.com/GreenInfo-Network/L.TileLayer.PixelFilter/ 6、卷帘对比(卷积运算)(历史对比)(非常重要) https://github.com/digidem/leaflet-side-by-side 7、webGL地图要素渲染(适用于三维要素绘制)(非常重要) https://gitlab.com/IvanSanchez/Leaflet.TileLayer.GL 8、快速重新渲染地图要素,动态修改地图样式(适用于矢量切片)

Aggregate Weighted Linestrings for Clustered Markers in Leaflet in R

不问归期 提交于 2020-04-07 09:19:08
问题 I'm trying to plot locations and weighted connecting linestrings. When I zoom in or out the clustering of the markers adjusts fine. The shown labels of the clusters are the aggregated node_val of the markers. I would like to do similar with the linestrings, so that the plot does not show the blue lines connecting the single markers, but instead lines connecting the clusters of markers, and the new linestrings that connect the clusters of markers are customized in width dependent on the wgt

Aggregate Weighted Linestrings for Clustered Markers in Leaflet in R

99封情书 提交于 2020-04-07 09:18:47
问题 I'm trying to plot locations and weighted connecting linestrings. When I zoom in or out the clustering of the markers adjusts fine. The shown labels of the clusters are the aggregated node_val of the markers. I would like to do similar with the linestrings, so that the plot does not show the blue lines connecting the single markers, but instead lines connecting the clusters of markers, and the new linestrings that connect the clusters of markers are customized in width dependent on the wgt

mapbox

戏子无情 提交于 2020-04-06 03:53:45
Mapbox 是一个可以跨行业使用的开发平台,我们可以利用它对地图进行创建和定制,以解决地图、数据和空间分析等问题。 Leaflet 轻量 WebGIS 前端类库 Leaflet 是一个为建设移动设备友好的互动地图,而开发的现代的、开源的 JavaScript 库。 它是由 Vladimir Agafonkin 带领一个专业贡献者团队开发,代码量很小, 但具有开发人员开发在线地图的大部分功能。 Leaflet设计坚持简便、高性能和可用性好的思想,在所有主要桌面和移动平台能高效运作, 在现代浏览器上会利用HTML5和CSS3的优势,同时也支持旧的浏览器访问。 支持插件扩展,有一个友好、易于使用的API文档和一个简单的、可读的源代码。 来源: oschina 链接: https://my.oschina.net/u/560237/blog/3214983

Leaflet中L.Point与L.LatLng的区别联系

心不动则不痛 提交于 2020-04-05 22:00:20
Leaflet an open-source JavaScript library for mobile-friendly interactive maps   Leaflet中有两种表示坐标点的数据结构,一种是最常用的 LatLng ,另一种则是 Point 。 L.LatLng   LatLng是表示一个具有纬度(lat)和经度(lng)的地理坐标(以度为单位)。LatLng的以下组织形式均可用于leaflet的方法(除非有特殊说明): map.panTo([ 50 , 30 ]); //数组 map.panTo({ lng : 30 , lat : 50 }); //简单对象 map.panTo({ lat : 50 , lng : 30 }); //简单对象 map.panTo(L.latLng( 50 , 30 )); //函数 使用方法 var latlng = L.latLng( 50.5 , 30.5 ); 构造函数 构造函数 描述 L.latLng( <Number> latitude, <Number> longitude, <Number> altitude?) 通过给定的纬度和经度创建一个地理坐标点(海拔高度是 可选的 ,以米为单位) L.latLng( <Array> coords) 数组格式表示的地理坐标 L.latLng( <Object>

WebGIS 开发基础之 Leaflet

守給你的承諾、 提交于 2020-04-05 21:59:21
GIS 基本概念:GIS、Map、Layer、Feature、Geometry(几何)、Symbol、Data(Point、Polyline、Polygon)、Renderer、Scale、Projection(投影图)、Coordinates(经纬); GIS 开发概述:架构模式、常用平台和 SDK、二维三维 使用 Leaflet 开发 常用功能如下: 地图加载(底图类型、切换): 地图操作(缩放、平移、定位/书签、动画): 图层管理(加载、移除、调整顺序): 要素标绘(点/聚簇、线、面,符号化/静态动态): 属性标注(字段可选、样式定制): 专题地图(点、线、面,渲染): 查询定位(属性查询、空间查询/周边搜索/缓冲区/面查点线面/点线查面、图属互查、综合查询): 信息窗口(入口、Popup、定制): 坐标转换(地理与投影、不同地理坐标系): 空间运算(长度面积测量、点取坐标、缓冲区、相交包含关系): 动态监控(固定点状态切换、车辆监控) 来源: oschina 链接: https://my.oschina.net/u/560237/blog/3215661

Rotate leaflet Polyline/Rectangle

情到浓时终转凉″ 提交于 2020-03-25 21:59:34
问题 I'am trying to rotate Leaflet Rectangle using code from this question. rotatePoints (center, points, yaw) { const res = [] const angle = yaw * (Math.PI / 180) for (let i = 0; i < points.length; i++) { const p = points[i] // translate to center const p2 = new LatLng(p.lat - center.lat, p.lng - center.lng) // rotate using matrix rotation const p3 = new LatLng(Math.cos(angle) * p2.lat - Math.sin(angle) * p2.lng, Math.sin(angle) * p2.lat + Math.cos(angle) * p2.lng) // translate back to center

Coding and Paper Letter(八十)

会有一股神秘感。 提交于 2020-03-25 06:10:56
3 月,跳不动了?>>> 新一期资源整理。 1 Coding: 1.城市模拟综合。 UrbanSimulationSynthesis 2.基于 bookdown 的 ElegantBook。 ElegantBookdown 3.R语言包lifecycle,生命周期提供了一组工具和约定来管理导出功能的生命周期。 lifecycle 4.学习GitHub注册的基础知识,进行首次回购,上传文档/文件,分支,合并和拉取请求均在.ppt文档中进行了讨论 lunch and learn GitHub Basics ppt 5.这是MSU的PLP 847小组项目,由Greg Bonito教授。团队成员包括:Melini Jayawardana Austin McCoy Mitch Roth丽贝卡·谢伊。 TarSpot of Corn 6.弯嘴滨鹬和红颈滨鹬的迁徙方式和后果。 CurlewSands RedNStints 7.R语言包varstan,Varstan是一个使用哈密顿蒙特卡洛方法对结构化时间序列模型进行贝叶斯估计的软件包,该方法由Stan(一种C ++的概率语言模型)实现。 varstan 8.这是一个客户端库,可用于检测Python应用程序的分布式跟踪收集,并将这些跟踪发送到Jaeger。有关更多详细信息,请参见OpenTracing Python API。 jaeger

Leaflet: how can I display a marker or legend only on one layer?

一世执手 提交于 2020-03-23 08:05:54
问题 I made a leaflet map with different layers which look like this: L.easyButton('<span class ="buttons">Example </span>', function (btn, map) { if (map.hasLayer(example1)) { map.removeLayer(example1); }; if (map.hasLayer(example2)) { map.removeLayer(example2); }; if (map.hasLayer(example3)) { map.removeLayer(drittpa2017zweit); } map.addLayer(example4); }, 'FirstExample').addTo(map); and so on... I declared a legend, which I only want to use when one layer is on, right now it appears all the