Skip to main content

All Questions

Tagged with
0 votes
1 answer
4k views

Style GeoJSON in react leaflet map library

I have implemented the leaflet map library in my react project https://react-leaflet.js.org/en/ and implemented a geojson map component like below class MapContainer extends React.Component { state ...
CraZyDroiD's user avatar
  • 6,993
8 votes
1 answer
6k views

React-leaflet geojson onEachFeature popup with custom react component

I am trying to render custom react component in react-leaflet GeoJSON onEachFeature popup, e.g. to fire modal with all corresponding feature.properties. In a popup react-leaflet component it works ...
astricus's user avatar
3 votes
1 answer
6k views

Importing GeoJSON file to React-Leaflet

I'm trying to import a GeoJSON file to react-leaflet like below: import * as bar from "./data/bar.geojson"; ... function Foo() { return ( <Map center={[...]} zoom={...}> <...
Jay M.'s user avatar
  • 41
0 votes
0 answers
2k views

react-leaflet GeoJSON with typescript

I am pretty new using typescript with reactjs. Currently, the project I am working on is using a react-leaflet/leaflet specifically their GeoJSON component. I am running into a typescript error when I ...
Solijon Sharipov's user avatar
1 vote
1 answer
369 views

What is the good way to create custom GeoJSON component

I Need help to create GeoJSON custom component from React-Leaflet Write with React and React-Leaflet (last version both) The code works when write in the Map component, but I want to import/export it ...
Baudouin BRANCHE's user avatar
2 votes
1 answer
5k views

Loading geoJSON Markers from API - React Leaflet

Leaflet and using GeoJSON. I am trying to get the markers from a fetched GeoJSON API to render on the map, once the data is stored on the state. I have tried using the marker component to display the ...
Shawn's user avatar
  • 41
1 vote
0 answers
611 views

Leaflet (geojson) mouseover don't work

I am having problems attaching mouseover, mouseout and click events to leaflet geojson features. I cannot make them work. Here is my code: import React, { Component } from 'react'; import L from '...
emptyname's user avatar

15 30 50 per page
1 2
3