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

What is Framer? Join the Community
Return to index
Muhammad Athar
Posted Nov 14 - Read on Facebook

Hi community. Has someone ever experienced an offset on mapbox drag and pan while using on Framer?
If someone has experience with mapbox and framer please help me.

9 Comments

Muhammad Athar
Ciaran Madigan

Weird issue, dude. I can't see anything wrong with your code.
Could it be the module?

Muhammad Athar

Could this be the reason?

Jacky Lee

https://framer.cloud/vFjIe/

Can you check if this fixes the offset issue you had?

Manas Vaze

Muhammad Athar this seems to fix the issue? can pan and zoom normally on this prototype

Ciaran Madigan

What was the fix in the end?

Muhammad Athar

I see...
mapLayer.classList.add('map')
document.getElementsByClassName('map')[0].setAttribute('id', 'map')
As compared to:
mapLayer.html = "<div id='map'></div>"
mapElement = mapLayer.querySelector("#map")
mapElement.style["width"] = Screen.width + 'px'
mapElement.style["height"] = Screen.height + 'px'
Would love to hear you what it changes behind the scenes.

Aditya Narayan

Damian Chmiel check this one.

Manikandan Kandadai

Damian Chmiel did you get this to work ? Can you share the fix? I am experiencing the same strange offset while zooming and panning.

Read the entire post on Facebook