Category "mapbox-gl-js"

marker is showing out of the map in mapboxgl react project

I am using mapboxgl for the first time. i found the source code from github. the map is working fine but the marker is showing outside of the map. don't underst

Using MVT Style specification to style MVT layer in deck.gl

I'm working on implementing an MVT/PBF server on a deck.gl map and trying to find a way to implement the accompanying style JSON, i.e. Mapbox GL JS Style Specif

map.fitbounds giving wrong results when bearing is changed

mapbox-gl-js version: 2.7.0 / all other versions browser: Chrome/Safari Steps to Trigger Behavior View the jsfiddle (add your own accessToken): https://jsfiddle

Mapbox GL JS with Maki icons by Marker

I generated a list of Maki Icons I want to use via the original icon editor. drawMarkers() { let self = this; const mapboxgl = require("mapbox-gl"); let d

Mapbox - Cannot trigger marker click with "element".click() after clicking on map

I've currently implemented custom markers on the map using the following code: // extend mapboxGL class so we can edit the click function class CustomMarker

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