使用Mapstraction拖动(移动)多边形
我正在努力找到一种方法来拖动多边形使用。 但我找不到任何这样的例子 在这种情况下,如何拖动多边形使用Mapstraction拖动(移动)多边形,maps,openlayers,geocoding,polygon,mapstraction,Maps,Openlayers,Geocoding,Polygon,Mapstraction,我正在努力找到一种方法来拖动多边形使用。 但我找不到任何这样的例子 在这种情况下,如何拖动多边形 JS我试过的代码 // initialise the map with your choice of API var mapstraction = new mxn.MapstractionInteractive('mapstraction','openlayers'); mapstraction.setCenterAndZoom(new mxn.LatLonPoint
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)
我今天回答了一个非常类似的问题:这是一个复制品吗?