Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error with maplibre not showing #2461

Open
thobbyAk opened this issue Jan 8, 2025 · 0 comments
Open

[Bug]: Error with maplibre not showing #2461

thobbyAk opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@thobbyAk
Copy link

thobbyAk commented Jan 8, 2025

Description

my map suddenly stopped showing and i had the following error in my console .
it seems like it might have been caused by a recent update but i havent updated any of my libraries . i searched the issues but i cant find anything similar
i get the error below
Screenshot 2025-01-08 174127
things i tried
i updated the react-map library to "react-map-gl": "^7.1.8" nd i get the street view back, however the satellite view doesnt work from me anymore the only view that works is the streets view when i do this

 `<Map
{...mapView}
onMove={(e) => setMapView(e.viewState)}
style={{ width: "100%", height: "calc(100vh - 70px)" }}
mapStyle={`https://api.maptiler.com/maps/streets/style.json?key=accesskey`}
ref={mapref}
onClick={onClickMap}
id="activeMap"
sprit
>`

when i change
mapStyle={https://api.maptiler.com/maps/streets/style.json?key=accesskey`}` to
mapStyle={https://api.maptiler.com/maps/hybrid/style.json?key=accesskey`}`
doesnt show the satellite view anymore

Expected Behavior

should show a normal map with streets view on streets-2 and satellite view on hybrid

Steps to Reproduce

install map libre 7.1.7 in your react app
install "mapbox-gl": "^3.4.0",
"maplibre-gl": "^4.1.3",

set map as 
    `	<Map
						{...mapView}
						onMove={(e) => setMapView(e.viewState)}
						style={{ width: "100%", height: "calc(100vh - 70px)" }}
						mapStyle={`https://api.maptiler.com/maps/steets-v2/style.json?key=accessKey`}
						ref={mapref}
						onClick={onClickMap}
						id="activeMap"
						sprit
					></Pap>` 

Environment

  • Framework version: "react-map-gl": "^7.1.7",
  • Map library: "mapbox-gl": "^3.4.0",
    "maplibre-gl": "^4.1.3",
  • Browser: chrome
  • OS: windows OS

Logs

Screenshot 2025-01-08 174127

@thobbyAk thobbyAk added the bug label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant