我正在努力寻找一种使用Mapstraction拖动 Polygon 的方法。但是找不到任何例子。
在这种情况下如何拖动多边形?
JS
我尝试过的代码
// initialise the map with your choice of API
var mapstraction = new mxn.MapstractionInteractive('mapstraction','openlayers');
mapstraction.setCenterAndZoom(new mxn.LatLonPoint(40, -3),5);
var latlon = new mxn.LatLonPoint(17.384225, 78.486586);
mapstraction.setCenterAndZoom(latlon, 10);
var polyPoint;
var polyPoints = []
//Adding polygon to map
polyPoint = new mxn.LatLonPoint(17.447612 , 78.223686)
polyPoints.push(polyPoint);
polyPoint = new mxn.LatLonPoint(17.504593 , 78.306084)
polyPoints.push(polyPoint);
polyPoint = new mxn.LatLonPoint(17.471193 , 78.417320)
polyPoints.push(polyPoint);
polyPoint = new mxn.LatLonPoint(17.414201 , 78.470879)
polyPoints.push(polyPoint);
var polygon = new mxn.Polyline(polyPoints);
polygon.setClosed(true);
mapstraction.addPolyline(polygon)