Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import { render } from 'react-dom';
- import { Map, Marker, Popup, TileLayer } from 'react-leaflet';
- const position = [51.505, -0.09];
- const map = (
- <Map center={position} zoom={13}>
- <TileLayer
- url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
- attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
- />
- <Marker position={position}>
- <Popup>
- <span>A pretty CSS3 popup.<br/>Easily customizable.</span>
- </Popup>
- </Marker>
- </Map>
- );
- render(map, document.getElementById('map-container'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement