Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafrok committed Apr 19, 2018
1 parent fd021bc commit 2875ea9
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 68 deletions.
72 changes: 38 additions & 34 deletions docs/md/en/baidu-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,32 @@ Baidu Map instance allows users to set a custom theme.

```html
<template>
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="{styleJson: styleJson}">
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle">
</baidu-map>
</template>
<script>
export default {
data () {
return {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
mapStyle: {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
]
]
}
}
}
}
Expand All @@ -149,7 +151,7 @@ export default {

#### Preview
<doc-preview>
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="{styleJson: styleJson}">
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle">
</baidu-map>
</doc-preview>

Expand Down Expand Up @@ -257,23 +259,25 @@ export default {
lat: 39.915
},
zoom: 15,
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
mapStyle: {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
}
]
]
}
}
},
methods: {
Expand Down
72 changes: 38 additions & 34 deletions docs/md/zh/baidu-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,30 +113,32 @@

```html
<template>
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="{styleJson: styleJson}">
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle">
</baidu-map>
</template>
<script>
export default {
data () {
return {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
mapStyle: {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
]
]
}
}
}
}
Expand All @@ -145,7 +147,7 @@ export default {

#### 预览
<doc-preview>
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="{styleJson: styleJson}">
<baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle">
</baidu-map>
</doc-preview>

Expand Down Expand Up @@ -253,23 +255,25 @@ export default {
lat: 39.915
},
zoom: 15,
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
mapStyle: {
styleJson: [
{
"featureType": "all",
"elementType": "geometry",
"stylers": {
"hue": "#007fff",
"saturation": 89
}
},
{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "#ffffff"
}
}
}
]
]
}
}
},
methods: {
Expand Down

0 comments on commit 2875ea9

Please sign in to comment.