Questions tagged [react-map-gl]

React friendly API wrapper around MapboxGL JS.

291 questions
4
votes
1 answer

How can i get the location of the user - Using at React Map GL

I'm using React Map GL, and I want to put the latitude and longitude of the user Returning the component like this: export default geolocated({ positionOptions: { enableHighAccuracy: false }, userDecisionTimeout: 5000 })(Layout); I'm…
Laura Beatris
  • 1,782
  • 7
  • 29
  • 49
4
votes
5 answers

React Map GL: map not taking the entire width

I am using semantic react ui as a ui library and react map gl to render maps in my react application. But the Maps rendered from react-map-gl are not taking the entire width of the column. Please find the image below: The dotted line represents the…
Ashy Ashcsi
  • 1,529
  • 7
  • 22
  • 54
4
votes
1 answer

Draw a linear animated line between two markers in MapBox

I have seen few examples of animated line on mapbox but I haven't found any that creates a linear line between two points. I am able to create markers on the map and also to draw a line between these markers. But, I want to create that line slowly…
3
votes
0 answers

I have used circle marker to show places on a world map in react. How to add popup on circle marker to shows up the location when circle is clicked?

I have used circle marker to show places on a world map in react. How to add popup on circle marker to show details when circle is clicked. Currently the code shows a interactive map with circle marker for locations and countries are highlighted…
3
votes
0 answers

Mapbox react-gl with onLoad ref

I am trying to do this with react-map-gl but cant seem to get it to work. Here is the documentation for what I am trying to do. Just not sure how to do it with react-map-gl https://github.com/Rylern/InterpolateHeatmapLayer#readme import MapGL, {…
matieva
  • 365
  • 4
  • 12
3
votes
3 answers

react-map-gl Marker is moving when zooming the map

I've built a React app with a map component which renders a map. I tried to add a marker, but the marker keeps moving when I zoom. What is causing this to happen? import MapGL, { Marker } from "react-map-gl" import { useState } from "react"; const…
Tim MG
  • 426
  • 5
  • 17
3
votes
2 answers

react-map-gl is not fullscreen until resizing window

I am using the ionic framework with React and trying to display a map via mapbox and react-map-gl. It is working, but the map is only 100px * 100px or so until I resize the page. I have set the width and height css properties to 100vw and 100vh…
ni-eminen
  • 35
  • 5
3
votes
0 answers

With react-map-gl, can I set the viewport to center on a latitude and longitude, but with an offset in pixels

Essentially, I want to set the center of the map to some coordinates x, y where there is a Marker. Then move the center of the map up by some value of pixels on the screen so that the marker appears slightly below the center of the map. My initial…
Kyle Hobbs
  • 445
  • 1
  • 4
  • 14
3
votes
1 answer

Why is the react-map-gl Source not using an object?

I'm trying to add geoJSON into a react-map-gl map using typescript here is my code the data variable is a parsed JSON file so it is an object not the error I…
3
votes
0 answers

Testing react-map-gl with jest and react testing library timeout

I am currently trying to test a Component wrapped with third party library which is react-map-gl marker. It keep throwing error like project undefined. so I looked into the react-map-gl code. let [x, y] = this._context.viewport.project([longitude,…
fiddlest
  • 1,262
  • 2
  • 17
  • 42
3
votes
2 answers

React Mapbox layer not showing

I'm trying to use React Mapbox but I'm facing some problems with using the Layer component. I'm trying to follow this demo: https://github.com/alex3165/react-mapbox-gl/blob/master/example/src/demos/heatmap.tsx Or even the "quick start" demo from the…
itaik
  • 305
  • 4
  • 10
3
votes
2 answers

Rendering over 1000 markers using React Map GL

I am experiencing a problem with rendering large amount of markers. Each marker is displayed as a SVG. Everything is fine until the number of markers increases to more than 1000. The map start lagging and there is delay when zoom in or zoom out,…
3
votes
2 answers

React useState option value 1 step behind onChange selection

The size.value state is one option behind when the _updateData function triggers onChange of the is "All", locations is empty...the option is changed to "Medium",…
ckingchris
  • 559
  • 1
  • 12
  • 25
3
votes
1 answer

How to use Kepler.gl for datasets > 250 MB

I am using Kepler.gl to plot data . It works wonderfully and gives me the required plot. The issue is : I have very huge csv file ( 440 MB) , i read somewhere that on certain browsers like safari kepler.gl supports upto 250MB datasets but it doesn't…
DiscoveringNew
  • 73
  • 2
  • 13
3
votes
1 answer

Basic DeckGL map with controller buttons in React

I am trying to get a basic DeckGL example working. What should I do to see control buttons like image below? It is just taking too much time so decided to ask the SO community. import React from 'react'; import DeckGL from 'deck.gl'; import {…
Hiwa
  • 587
  • 6
  • 21
1
2
3
19 20