| | |
| | | |
| | | <!-- </div>--> |
| | | <div |
| | | v-show="$store.state.isNaviget" |
| | | class="sindagis-map-compass" |
| | | style=" bottom: 130px; right: 35px;" |
| | | > |
| | | <span |
| | | class="left" |
| | |
| | | init2DMap() { |
| | | var layerBase = []; |
| | | if (!is_production) { |
| | | // window.vectorLayer = new TileLayer({ |
| | | // source: new XYZ({ |
| | | // url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}", |
| | | // }), |
| | | // }) |
| | | window.vectorLayer = new TileLayer({ |
| | | var vectorLayer = new TileLayer({ |
| | | source: new XYZ({ |
| | | url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}", |
| | | }), |
| | | }) |
| | | var imageLayer = new TileLayer({ |
| | | source: new XYZ({ |
| | | url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}", |
| | | }), |
| | | }) |
| | | layerBase = [vectorLayer] |
| | | layerBase = [vectorLayer, imageLayer] |
| | | } |
| | | window.map = new Map({ |
| | | target: "mapol", |
| | |
| | | |
| | | |
| | | |
| | | // var scaleLine = new ScaleLine({ |
| | | // units: "metric" |
| | | // }); |
| | | // map.addControl(scaleLine); |
| | | var scaleLine = new ScaleLine({ |
| | | units: "metric" |
| | | }); |
| | | map.addControl(scaleLine); |
| | | |
| | | map.on("moveend", function (e) { |
| | | console.log(($(window).width() - $(".ol-scale-line-inner").width()) + "px"); |
| | |
| | | } |
| | | .ol-scale-line { |
| | | bottom: 55px !important; |
| | | right: 130px !important; |
| | | } |
| | | |
| | | .sindagis-map-compass { |
| | | position: absolute; |
| | | right: 50px; |
| | | bottom: 90px; |
| | | |
| | | z-index: 5; |
| | | right: 25px; |
| | | |
| | | width: 52px; |
| | | height: 54px; |
| | | background: url("../assets/img/compass.png") 0% 0% / 266px no-repeat; |