Skip to content

Commit

Permalink
Fix: add missed slash in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
leftstick committed Apr 2, 2018
1 parent 7889dc0 commit d198449
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;circle center="{expression}" radius="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;circle&gt;
&lt;circle center="{expression}" radius="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;/circle&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const NEW_SHANGHAI_INTERNATIONAL_TOWER = {
longitude: 121.51606,
latitude: 31.244604
};
longitude: 121.51606,
latitude: 31.244604
}

export default {
template: `
template: `
<p>
The <code>control</code> component is sub-component of <code>baidu-map</code>. It is used to add <code>BMap.Control</code> to the map.
</p>
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;control type="{string}" options="{expression}"&gt;&lt;control&gt;
&lt;control type="{string}" options="{expression}"&gt;&lt;/control&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down Expand Up @@ -85,32 +85,34 @@ export default {
]);</code></pre>
</div>
`,
controller: class {
/* @ngInject */
constructor() {
this.opts = {
centerAndZoom: {
...NEW_SHANGHAI_INTERNATIONAL_TOWER,
zoom: 16
}
};
this.navOpts = {
anchor: window.BMAP_ANCHOR_TOP_LEFT
};
this.overOpts = {
anchor: window.BMAP_ANCHOR_BOTTOM_RIGHT
};
controller: class {
/* @ngInject */
constructor() {
this.opts = {
centerAndZoom: {
...NEW_SHANGHAI_INTERNATIONAL_TOWER,
zoom: 16
}
}
this.navOpts = {
anchor: window.BMAP_ANCHOR_TOP_LEFT
}
this.overOpts = {
anchor: window.BMAP_ANCHOR_BOTTOM_RIGHT
}
}

mapLoaded(map) {
this.copyOpts = {
anchor: 1,
copyrights: [{
id: 0,
content: '<strong>This is the customized Copyright</strong>!',
bounds: map.getBounds()
}]
};
}
mapLoaded(map) {
this.copyOpts = {
anchor: 1,
copyrights: [
{
id: 0,
content: '<strong>This is the customized Copyright</strong>!',
bounds: map.getBounds()
}
]
}
}
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;heatmap options="{expression}" dataset="{expression}" loaded="{expression}"&gt;&lt;heatmap&gt;
&lt;heatmap options="{expression}" dataset="{expression}" loaded="{expression}"&gt;&lt;/heatmap&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import markericonUrl from 'img/markericon.png';
import markericonUrl from 'img/markericon.png'

const NEW_SHANGHAI_INTERNATIONAL_TOWER = {
longitude: 121.51606,
latitude: 31.244604
};
longitude: 121.51606,
latitude: 31.244604
}

export default {
template: `
template: `
<p>
The <code>marker</code> component is sub-component of <code>baidu-map</code>. It is used to add <code>BMap.Marker</code> to the map.
</p>
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;marker point="{expression}" options="{expression}" click="{expression}"&gt;&lt;marker&gt;
&lt;marker point="{expression}" options="{expression}" click="{expression}"&gt;&lt;/marker&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down Expand Up @@ -100,39 +100,42 @@ export default {
]);</code></pre>
</div>
`,
controller: class {
/* @ngInject */
constructor() {
this.opts = {
centerAndZoom: {
...NEW_SHANGHAI_INTERNATIONAL_TOWER,
zoom: 16
}
};
this.markerOpts = {
offset: {
width: 0,
height: -30
},
icon: {
url: markericonUrl,
size: {
width: 49,
height: 60
}
}
};
this.point = NEW_SHANGHAI_INTERNATIONAL_TOWER;
controller: class {
/* @ngInject */
constructor() {
this.opts = {
centerAndZoom: {
...NEW_SHANGHAI_INTERNATIONAL_TOWER,
zoom: 16
}

showWindow(e, marker, map) {
map.openInfoWindow(new BMap.InfoWindow('地址:浦东南路360号', {
title: '新上海国际大厦',
offset: {
width: 0,
height: -30
}
}), marker.getPosition());
}
this.markerOpts = {
offset: {
width: 0,
height: -30
},
icon: {
url: markericonUrl,
size: {
width: 49,
height: 60
}
}
}
this.point = NEW_SHANGHAI_INTERNATIONAL_TOWER
}

showWindow(e, marker, map) {
map.openInfoWindow(
new BMap.InfoWindow('地址:浦东南路360号', {
title: '新上海国际大厦',
offset: {
width: 0,
height: -30
}
}),
marker.getPosition()
)
}
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;overlay type="{string}" options="{expression}" dataset="{expression}"&gt;&lt;overlay&gt;
&lt;overlay type="{string}" options="{expression}" dataset="{expression}"&gt;&lt;/overlay&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;polygon points="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;polygon&gt;
&lt;polygon points="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;/polygon&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
<h2 class="title">Usage</h2>
<div class="snippet" highlight>
<pre><code class="html">&lt;baidu-map map-options="{expression}"&gt;
&lt;polyline points="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;polyline&gt;
&lt;polyline points="{expression}" options="{expression}" loaded="{expression}"&gt;&lt;/polyline&gt;
&lt;/baidu-map&gt;</code></pre>
</div>
<h2 class="title">Attributes</h2>
Expand Down

0 comments on commit d198449

Please sign in to comment.