禁止地图可以相机倾斜,右击有菜单

main
许宏杰 8 months ago
parent c256c6ff43
commit a360e19438

@ -5,4 +5,4 @@ VUE_APP_TITLE = 云坤地图
ENV = 'production' ENV = 'production'
# 云坤地图/生产环境 # 云坤地图/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = 'http://39.101.188.84:9066'

@ -40,7 +40,7 @@
</template> </template>
<script> <script>
import { getCarLocation } from "@/api/static/index.js"; import carJSON from "@/api/carrRealtimeLocation.json";
import MarsMap from "@/components/mars-map"; import MarsMap from "@/components/mars-map";
// import grids from "@/components/grids.vue"; // import grids from "@/components/grids.vue";
export default { export default {
@ -94,9 +94,7 @@ export default {
methods: { methods: {
// //
getCarLocation() { getCarLocation() {
getCarLocation().then((res) => { this.createCar(carJSON.list);
this.createCar(res.list);
});
}, },
/** /**

@ -37,6 +37,9 @@ export default {
pitch: -46.2, pitch: -46.2,
}, },
}, },
control: {
contextmenu: { preventDefault: false, hasDefault: false },
},
basemaps: [ basemaps: [
{ {
name: "mapbox影像图", name: "mapbox影像图",
@ -69,16 +72,17 @@ export default {
methods: { methods: {
mapLoad(map) { mapLoad(map) {
this.map = map; this.map = map;
if (process.env.NODE_ENV === "production") {
// - - // - - -
map.setSceneOptions({ map.setSceneOptions({
cameraController: { cameraController: {
enableZoom: false, enableZoom: false,
enableTranslate: false, enableTranslate: false,
enableRotate: false, enableRotate: false,
}, enableTilt: false,
}); },
} });
// //
this.suzhouLayer = new mars3d.layer.GraphicLayer({ zIndex: 10 }); this.suzhouLayer = new mars3d.layer.GraphicLayer({ zIndex: 10 });
map.addLayer(this.suzhouLayer); map.addLayer(this.suzhouLayer);

@ -31,6 +31,9 @@ export default {
pitch: -61.6, pitch: -61.6,
}, },
}, },
control: {
contextmenu: { preventDefault: false, hasDefault: false },
},
basemaps: [ basemaps: [
{ {
name: "mapbox影像图", name: "mapbox影像图",
@ -67,6 +70,7 @@ export default {
enableZoom: false, enableZoom: false,
enableTranslate: false, enableTranslate: false,
enableRotate: false, enableRotate: false,
enableTilt: false,
}, },
}); });
@ -266,6 +270,7 @@ export default {
circular: { circular: {
rotateLabel: true, rotateLabel: true,
}, },
label: { label: {
normal: { normal: {
show: true, show: true,
@ -336,7 +341,7 @@ export default {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 100px; top: 100px;
z-index: 10; z-index: 60;
transform: translateX(-50%); transform: translateX(-50%);
display: flex; display: flex;
flex-direction: column; flex-direction: column;

Loading…
Cancel
Save