mapbox / mapbox-gl-compare

Swipe and sync between two maps
ISC License
147 stars 42 forks source link

Fullscreen map #8

Open Pantoeflou opened 7 years ago

Pantoeflou commented 7 years ago

Hi Guys,

I am using the mapbox-gl-compare plugin on top of a map that displays inside a container.

I am now trying to add a 'fullscreen button', but to no avail

Using: after.addControl(new mapboxgl.FullscreenControl()); displays the the button, but only makes the 'after' map full screen

I then tried creating my own function where I do the following on click:

This sort of works, the fullscreen view renders the map (ans slider) at what seems just over 200% height

Any possibility of adding support for the FullscreenControl() function

.panel-fullscreen { display: block; z-index: 9999; position: fixed; width: 100%; height: 100%; top: 0; right: 0; left: 0; bottom: 0; overflow: auto; }

tuneis commented 6 years ago

+1

tuneis commented 6 years ago

@Pantoeflou See #14 for a pull request for this feature if accepted by the moderators.