Exploring Options and Troubleshooting Issues with Embedding Mapbox in a WeWeb Application

The State Changers discussed embedding content into an application, notably Mapbox. Specific bottlenecks encountered include issues with accessing underlying data and the constraints of using iframe. The conversation explored the possibility of using the Mapbox plug-in within WeWeb and configuring it via properties like the access token and style. There was difficulty in mapping this correctly.

Different approaches to the problem were discussed. One suggestion was to take the HTML code from the Mapbox map and embed it as an HTML element. It was further proposed to use a new NPM integration feature in WeWeb, which helps create a script tag that points to an NPM package. They considered loading this in JavaScript to enable control over various parameters including BYOK (Bring Your Own Key) for setting up access tokens to Mapbox. Another suggested approach was creating a custom component, though it was advised to explore this as an option after working with JavaScript. The participants discussed potential drawbacks like working in the editor with custom code, which could bring up difficulties in visualizing the end product. A factor that could ease this issue is using the NPM integration with Mapbox GL, which would make it easier to load and create custom controls earlier in the lifecycle of the application. As the meeting concluded, the State Changer agreed to push forward with exploring these solutions, the chief of which remained implementing the key properties via JavaScript and possibly using an iframe if absolutely necessary.

(Source: Office Hours 10/5/2023 PM )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free