|
@@ -43,6 +43,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.map.on("click", function(e) {
|
|
|
+ console.log(e)
|
|
|
var feature = that.map.forEachFeatureAtPixel(e.pixel,
|
|
|
function(feature) {
|
|
|
return feature;
|
|
@@ -61,13 +62,13 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- this.addpoint();
|
|
|
- this.addline();
|
|
|
+ this.addpoint();
|
|
|
+ this.addline();
|
|
|
},
|
|
|
methods: {
|
|
|
//[[1111,1111]]
|
|
|
transpoints: function(points, type) {
|
|
|
- if (ispro) {
|
|
|
+ if (false) {
|
|
|
return points;
|
|
|
} else {
|
|
|
if (type == 1) {
|
|
@@ -223,8 +224,8 @@ export default {
|
|
|
});
|
|
|
map.getView().fit([75.0, 20.0, 135.0, 50.0], map.getSize());
|
|
|
this.map = map;
|
|
|
- // map.getView().setCenter(this.transpoints([[118.78, 32.04]],0)[0]);
|
|
|
- // map.getView().setZoom(13);
|
|
|
+ map.getView().setCenter(this.transpoints([[118.78, 32.04]],0)[0]);
|
|
|
+ map.getView().setZoom(13);
|
|
|
},
|
|
|
|
|
|
addline:function(){
|