Category "mapbox-gl-js"

react-mapbox-gl markers are not displayed correctly

I have a site with mapbox, the map itself works fine, but I can't add markers to it. I copied the code from one source on which everything works, but when I add

mapbox : how to combine two expressions to style a layer?

I have this expressions that styles my layer when a feature is clicked: the circle radius changes from 2 (default) to 5 (clicked). 'circle-radius'=> [ 'c

Mapbox GL JS Set Paint property on specific Feature in Layer

I am using Mapbox Studio as basis for mapping and styling and then using HTML for additional map features. One of the features is to change Icon opacity when h

raster tiles from a custom source in ReactMapGL

I'm new to ReactMapGL library, I need to load openweathermap data on Mapbox map using ReactMapGL library following the way I have tried but it is not successful

Mapbox GL JS change marker image programmatically?

I am using Mapbox GL JS to display a lot of pins on a map with custom marker image: map.on('load', function () { map.loadImage("/path/to/pin1.png", function(

Map Dissapearing After Calling JumpTo (MapboxGL + React)

I'm developing a website that takes in an address from a user and plots a list of nearby locations using MapBoxGL and React. When the user runs the search, an A

Mapbox Layer wont update on statechange

I am trying to use a custom layer and update it over time but can't seem to get it to work to update when state changes. I am using a library to interpolate I

Multiple LineLayer Colour doesn't change in the ShapeSource

I have use the MapBox to draw multiple lines with different coordinate, So I use the ShapeSource layer and LineLayer for this, Currently I have take one ShapeSo

How to display custom building on mapbox-gl map

I wan't to display my own buildings on map(as in example). They should be static - my screen example At screenshot you can see example with marker building(it m

How to drag a polygon in mapbox-gl-js?

I have a map with multiple polygons. The polygons need to move/update on user click/drag. The functionality I want is the same as this example: https://www.mapb

Add padding to map area in MapBox

How can I add padding to the map area? As you can see in the screenshot there is a yellow div overlaid over the top and the popup is appearing underneath it s

How can I assign the contents of a geojson file to a variable in Javascript?

The code shown already works, but I want to clean it up. It declares a variable called placez which contains information in geojson format for the next part of

How can I add an icon to switch the mapboxgl style dynamically?

I want to add an icon as below in the mapboxgl view. Working with Angular2 When I click the icon it should automatically switch the styles (streets-v9, satel

Style a Mapbox Popup's Pointer/Indicator

I am styling some popups for a map displayed through Mapbox using Mapbox's GL JS. However, I cannot find in their documentation regarding the classes that are a

How to detect when Mapbox/Leaflet enters or exits fullscreen mode

How can I detect when Mapbox or Leaflet enters or exits fullscreen mode? I found this answer where someone said this: Documentation says: map.on('fullscreencha

Add many 3d objects on mapbox map using three.js

I want to add about 20.000 plane geometries on mapbox map. Docs have example with only one object(even camera configured for one object). My purpose - isometric

How to add "click" listener on marker in mapbox-gl-js

I added few markers on the map using folowing this example: https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/ Now I want to show popup when user cl

How to embed kepler.gl map in HTML page?

I have downloaded the source codes for kepler.gl from https://github.com/uber/kepler.gl and I have successfully created a local map using a dataset stored in ge

Mapbox event when brand new tile is loaded

I'm using Mapbox GL JS API to manipulate a Mapbox map. My question if there's an event that's capable of telling me for each HTTP request for new tile? I finish

How to use Vue components with Mapbox IControl

I want to use Vue in MapBox Controls instead of playing with good old DOM APIs.