forked from PaulLeCam/react-leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathumd.html
More file actions
48 lines (46 loc) · 1.69 KB
/
umd.html
File metadata and controls
48 lines (46 loc) · 1.69 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React-Leaflet UMD example</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.15.0/babel.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.js"></script>
<script src="../dist/react-leaflet.js"></script>
<style>
body {
padding: 20px;
}
.leaflet-container {
height: 400px;
width: 80%;
margin: 0 auto;
}
</style>
</head>
<body>
<div id="container"></div>
<script type="text/babel" data-presets="es2015,react">
const React = window.React
const { Map, TileLayer, Marker, Popup } = window.ReactLeaflet
const position = [51.505, -0.09]
const Example = () => (
<Map center={position} zoom={13}>
<TileLayer
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
/>
<Marker position={position}>
<Popup>
<span>A pretty CSS3 popup. <br/> Easily customizable.</span>
</Popup>
</Marker>
</Map>
)
window.ReactDOM.render(<Example />, document.getElementById('container'))
</script>
</body>
</html>