mapbox / mapbox-gl-geocoder

Geocoder control for mapbox-gl-js using Mapbox Geocoding API
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
ISC License
364 stars 180 forks source link

Mapbox geocoder [map.addControl(geocoder);] distorts in WordPress #504

Open NickWavve opened 1 year ago

NickWavve commented 1 year ago

I have added the Mapbox geocoder to my web map in the top-left position and made it collapsible.

image

As raw HTML it looks and works as expected. image

However, once the code is copied and added into WordPress as a code block it completely distorts. image

Can't seem to figure out what causes this or how to fix it. Any thoughts?

Here is a copy of the current code: GeocoderIssue.txt