cloudmade - 可拖动标记 +收集要在应用程序中存储或使用的标记坐标

发布于 2024-10-18 11:06:28 字数 112 浏览 11 评论 0原文

我想在我的一个项目中使用 CloudMade 映射。我需要能够创建一个可拖动标记,以便用户可以在地图上标记某个地理空间。我还希望能够将标记的坐标保存在数据库中。 CloudMade 可以实现这一点吗?如何实现?

I would like to use CloudMade mapping in one of my projects. I need to be able to create a draggable marker so users can mark a certain geographic space on the map. I would also like to be able to save the coordinates of the marker in a database. Is that possible with CloudMade and how?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭水袖舞倾城 2024-10-25 11:06:28
var centreIcon = new CM.Icon();
   centreIcon.image = "/images/marker_cross.png";
   centreIcon.iconSize = new CM.Size(15, 15);
   centreIcon.iconAnchor = new CM.Point(7.5, 7.5);

   newLocation = new CM.LatLng(gpsLat2, gpsLng2);
   centreMarker = new CM.Marker(newLocation,
   {
      title : "Centre", icon : centreIcon, draggable : true
   }
   );
   map.addOverlay(centreMarker);
var centreIcon = new CM.Icon();
   centreIcon.image = "/images/marker_cross.png";
   centreIcon.iconSize = new CM.Size(15, 15);
   centreIcon.iconAnchor = new CM.Point(7.5, 7.5);

   newLocation = new CM.LatLng(gpsLat2, gpsLng2);
   centreMarker = new CM.Marker(newLocation,
   {
      title : "Centre", icon : centreIcon, draggable : true
   }
   );
   map.addOverlay(centreMarker);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文