Set a marker at an arbitrary location on the web map

1 回表示 (過去 30 日間)
Aditya Manohar
Aditya Manohar 2020 年 8 月 3 日
コメント済み: Aditya Manohar 2020 年 8 月 10 日
  • How can I set a marker at an arbitrary location on the web map? Can the interactive feature be utilized to select a location by 'mouse click'?
  • How can I retrieve latitude/longitude data of this arbitrary point?

回答 (1 件)

Alan Moses
Alan Moses 2020 年 8 月 7 日
The webmap does not allow adding markers by clicking on it. Although, you can use the geoaxes plot to add markers to the webmap. The function ginput is used to retrieve the latitude and longitude in a vector by clicking click on the geoaxes plot. This vector can be used to add markers on the webmap by using the wmmarker function. The following code demonstrates for adding three markers on the webmap by clicking on the geoaxes plot:
webmap;
geoaxes('Basemap','streets');
[lat,lon] = ginput(3);
wmmarker(lat,lon);
Hope this helps!
  1 件のコメント
Aditya Manohar
Aditya Manohar 2020 年 8 月 10 日
Yes, this is very helpful. Thank you so much!

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by