开发者

cloudmade - draggable marker + collecting the marker coordinates to be stored or used in the application

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 th开发者_如何学JAVAe marker in a database. Is that possible with CloudMade and how?


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜