mapbox.js icon indicating copy to clipboard operation
mapbox.js copied to clipboard

Tooltip styling is broken using mapbox.standalone with leaflet

Open pixelwhip opened this issue 10 years ago • 5 comments

I'm using Leaflet 0.8-dev and Mapbox 2.1.5

There seems to be conflicting style rules for the .leaflet-popup-tip in leaflet.css and mapbox.standalone.css that cause the tip to break. See the attached screenshot.

image

pixelwhip avatar Feb 18 '15 20:02 pixelwhip

Yeah, it looks like the leaflet.js + leaflet.css + mapbox.standalone.js + mapbox.standalone.css combo will not work. mapbox.standalone.css is the same as mapbox.css, which is expected to be used in place of leaflet.css, not in addition to it.

@tristen - have I got this correct? If so, we should remove mapbox.standalone.css and write clear documentation on how to use mapbox.standalone.

jfirebaugh avatar Feb 19 '15 01:02 jfirebaugh

@jfirebaugh Good to know. I did remove leaflet.css and everything seemed to work in our particular case, but wasn't sure what other effects that might have.

pixelwhip avatar Feb 19 '15 15:02 pixelwhip

@pixelwhip @jfirebaugh that looks to be the issue yep. Removing mapbox.standalone.css might be a good plan.

tristen avatar Feb 19 '15 15:02 tristen

Removing it is technically a breaking API change (some people are likely using leaflet.js + mapbox.standalone.js + mapbox.standalone.css), so let's wait until 3.0 for that. For now let's add a page to the documentation about using standalone mode.

Points to cover:

  • This is for combining mapbox.js with a separate copy of leaflet, for example to use a different version than what's bundled, or a patched version
  • Correct usage is leaflet.js + mapbox.standalone.js + mapbox.css (provide code snippet)
  • Call out that Leaflet master / 0.8 / 1.0-beta is explicitly not supported

jfirebaugh avatar Feb 19 '15 17:02 jfirebaugh

Yeah just experienced this using the following 👍

v2.4.0/mapbox.js' v2.4.0/mapbox.css'

and leaflet.css. Was worried I needed it as im using plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen as well. Anyway removed leaflet.css and all is well now

davidr-halomicrosystems avatar Apr 18 '16 09:04 davidr-halomicrosystems