<template>
  <baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle">
  </baidu-map>
</template>
<script>
export default {
  data () {
    return {
      mapStyle: {
        styleJson: [
          {
            "featureType": "all",
            "elementType": "geometry",
            "stylers": {
                "hue": "#007fff",
                "saturation": 89
            }
          },
          {
            "featureType": "water",
            "elementType": "all",
            "stylers": {
                "color": "#ffffff"
            }
          }
        ]
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.map{
    height:80%;
}
</style>
Logo

前往低代码交流专区

更多推荐