-
Notifications
You must be signed in to change notification settings - Fork 97
/
umd.html
31 lines (25 loc) · 1006 Bytes
/
umd.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>React-BMap umd示例</title>
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=1XjLLEhZhQNUzd93EjU5nOGQ"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.25.0/babel.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.js"></script>
<script src="../dist/react-bmap.min.js"></script>
</head>
<body>
<div id="container"></div>
<script type="text/babel" data-presets="es2015,react">
const React = window.React;
const { Map, Marker } = window.ReactBMap;
const position = {lng: 116.403981, lat: 39.91582};
const Example = () =>
<Map center={position} zoom={13}>
<Marker position={position} />
</Map>
window.ReactDOM.render(<Example />, document.getElementById('container'))
</script>
</body>
</html>