All Questions
16
questions with no upvoted or accepted answers
3
votes
0
answers
231
views
Use GeoJson data with Leaflet.PixiOverlay
I am using Leaflet.PixiOverlay(this package) in my App in order to render a big number of data(suck as markers, shapes, geoJson data, etc) without performance issues.
But the documentation of this ...
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={...}>
<...
2
votes
0
answers
270
views
how to change color on Mouse over leaflet-react?
i'm facing a problem of mouseover event in leaflet
the thing is , when i hover ,the weight of the city changes for 2s and it doesn't stay highlighted even though the mouse is over the city
here is my ...
1
vote
1
answer
88
views
How to Get GeoJSON Feature on Map.Locate in React Leaflet
I am creating a map with imported GeoJSON data. I am trying to create a Find Me button that will zoom to the user's location and get a property associated with the enclosing region (as defined by the ...
1
vote
0
answers
514
views
Draw polygon from API Data using React-leaflet and click event
I'm using react-leaflet and Geoman, to draw polygons on the map, I have an API that provides me with a GeoJSON. I can draw the shapes easily using const polygon = L.polygon(props.coordinates).addTo(...
1
vote
0
answers
368
views
I had error "Invalid LatLng object: (NaN, 86.06925048939979)" when using proj4leaflet
I had error "Invalid LatLng object: (NaN, 86.06925048939979)" when using proj4leaflet
Im using react leaflet for an interactive map. for gall-peter map projection i used proj4leaflet, while ...
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 ...
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 '...
0
votes
0
answers
35
views
GeoJSON component not updating with state
I am having the following problem: although the filteredData is being updated, the Map doesnt reflect it.
This is the relevant code for my HOC (which contians the Map component):
const ...
0
votes
2
answers
312
views
Type Error Importing GeoJSON file in a Typescript React App
I am trying to import a GeoJSON file to map region in a Leaflet map using React-Leaflet. I started the project using create-react-app. However, when I try to use the data in the GeoJSON component, I ...
0
votes
0
answers
153
views
GeoJson data is not being rendered over the react-leaflet map, when another shapefile is clicked
import React, { useState, useEffect, useRef } from "react";
import { MapContainer, TileLayer, GeoJSON } from "react-leaflet";
import "leaflet/dist/leaflet.css";
import ...
0
votes
2
answers
492
views
react-leaflet <GeoJSON /> pointToLayer option to change
I am learning react leaflet and trying to add circle marker on each point of geojson. Makers are not showing on map.
import React from 'react';
import Tiles from "./Tiles";
import L from '...
0
votes
0
answers
320
views
Can't display only one country with GeoJSON - React.js Leaflet
I use React-Leaflet and want to show only country one country .
I got geoJSON of country and gave style to it but other countries keep showing.
How may I hide or delete other countries ?
function ...
0
votes
1
answer
908
views
geojson-vt with react-leaflet
Does anyone have an example of a barebone repo of a react-leaflet project using geojson-vt?
I have react-leaflet project that has a 13 MB geoJSON file. I can't figure out how to get it to render ...
0
votes
1
answer
1k
views
Handling huge GeoJSON data
I have a map application which uses around 6 geoJSON files. Those files amount to about 60mb static and 18mb when gzipped. Until now these are placed in src which increases bundle size to 18.4mb(out ...