|
@@ -311,6 +311,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.map.on("click", function(e) {
|
|
|
+ console.log(e)
|
|
|
var feature = that.map.forEachFeatureAtPixel(e.pixel,
|
|
|
function(feature) {
|
|
|
return feature;
|
|
@@ -338,8 +339,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- this.addpoint();
|
|
|
- this.addline();
|
|
|
+ this.addpoint();
|
|
|
+ this.addline();
|
|
|
},
|
|
|
methods: {
|
|
|
//[[1111,1111]]
|
|
@@ -347,7 +348,7 @@ export default {
|
|
|
console.log(tab, event);
|
|
|
},
|
|
|
transpoints: function(points, type) {
|
|
|
- if (ispro) {
|
|
|
+ if (false) {
|
|
|
return points;
|
|
|
} else {
|
|
|
if (type == 1) {
|
|
@@ -498,13 +499,13 @@ export default {
|
|
|
target: "map",
|
|
|
layers: [ign],
|
|
|
view: new View({
|
|
|
- zoom: 10
|
|
|
+ zoom:2
|
|
|
})
|
|
|
});
|
|
|
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(){
|