Get User Input from webmap

조회 수: 3 (최근 30일)
CL
CL 2019년 10월 24일
댓글: Yasho Bharat Boggarapu 2020년 4월 28일
Dear all,
is there any way to get the coordinates from the cursor (which are already displayed at the top right corner of the browser window) on a webmap when i click on the map.
I want to add manually lines from user input to the map and store the points in workspace to do further processing. The problem is, that only webmap provides panning, zooming and high-quality maps. I already tried to get the osm data from WMS and vizualize them on my own, but to provide (wordwide) zooming and panning i need to download the whole OSM-data (approx. 80 GB).
The best solution would be a onClickListener, which grabs the geographic coordinates (from the browser window). Then i could save the data and draw the lines with wmline. On the Matlab documentary they show a similar example, but they read the coordinates manually. (https://de.mathworks.com/help/map/annotate-the-web-map-with-measurement-information.html).
Thanks in advance.

답변 (1개)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2019년 11월 8일
inputm can be used to get the lat-lon data on mouse-clicks from a map. I am not sure if this can be used with webmap’. Try using inputm’. For more information refer to the following link
  댓글 수: 2
CL
CL 2019년 11월 19일
Thank you for your answer.
'inputm' doesn't work, beacause webmap creates a canvas. There are no axes objects which are needed for 'inputm'.
Maybe this functionality should be included in one of the next updates. The coordinates of the curser are already displayed in the canvas.
Yasho Bharat Boggarapu
Yasho Bharat Boggarapu 2020년 4월 28일
Hi, Is this feature implemented in MATLAB 2020a?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Map Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by