react map example leaflets
import React from 'react'import { Map as LeafletMap, TileLayer, Marker, Popup } from 'react-leaflet';class Map extends React.Component { render() { return ( <LeafletMap center={[50, 10]} zoom={6} maxZoom={10} attributionControl={true} zoomControl={true} doubleClickZoom={true} scrollWheelZoom={true} dragging={true} animate={true} easeLinearity={0.35} > <TileLayer url='http://{s}.tile.osm.org/{z}/{x}/{y}.png' /> <Marker position={[50, 10]}> <Popup> Popup for any custom information. </Popup> </Marker> </LeafletMap> ); }}export default Map<style>.leaflet-container { height: 400px; width: 800px;}</style><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css">
Also in JavaScript:
- setting react state with produce immer
- sequelize where more than
- angular material chips
- js string explode
- how to create my own filter in js
- javascript !! vs !
- extract all link with javascript
- convert functoin with call back to promise
- starting with react router dom
- convert base64 to image javascript
- sticky operations in javascript
- localecompare javascript
- how to change background image dynamically in react
- replace all occurrences of a string in javascript
- load +main.js with system.import
- indexof javascript duplicate arrays
- how to Check if an array contains a string
- javascript cast bool to int
- javascript auto scroll down slowly
- node js check if called from command line
- map over object javascript
- on enter key press react
- javascript for
- ion button transparent