This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Dominic Winkler
Posted Dec 11 - Read on Facebook

hi team, I trying to whip up a quick prototype with mapbox at current stage. Including mapbox works fine but when I am trying to re-center the map with "setCenter([longitude, latitude])", Framer tells me map.setCenter is not a function but according to the mapbox API it should exist: https://www.mapbox.com/mapbox-gl-js/api/#map#setcenter Any tipps how to re-center the map according to my current location?

2 Comments

Dominic Winkler

screenshot of the code...

Sampo Pihlaja

Why not just use "map.setCurrentLocation()", that's what I've been using successfully in Framer/mapbox

Read the entire post on Facebook