Openlayers
MLAY
MLAY,开心就好!
展开
-
openlayers6.x 获取点到线的距离
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.9.0/css/ol.css" type="text/css"> <style>.原创 2021-11-16 09:48:13 · 1353 阅读 · 0 评论 -
Openlayers集成地图右键事件
//首先禁用document自带的右键功能document.oncontextmenu = function() { return false;};//右键函数/*params: map(创建的map对象)*/contextmenu(map) { map.getViewport().oncontextmenu = function(event) { event.preventDefault(); let pixel = map.getEventPixel(event).原创 2021-09-10 11:12:38 · 798 阅读 · 0 评论