Skip to content

Add ability to show controls  #12

Open
@DynamiteGoesBoom

Description

@DynamiteGoesBoom

Like the Google Maps' plugin already has, it would be awesome if we could control whether or not the mapbox map had controls.

I'm not sure what the API would look like for this but I'm currently passing this options object into the {{ mapbox.map(locations, options).tag() }} like so:

{% set options = {
    'id': 'locations-map',
    'popupTemplate': '_molecules/embeds/embed--popup.twig',
    'mapOptions': {
		'attributionControl': true,
        'scrollZoom': false,
		'dragPan': true,
		'keyboard': true,
		'style': 'mapbox://styles/mapbox/navigation-day-v1',
		'trackResize': true,
		'cooperativeGestures': true,
		'showCompass': true,
		'boxZoom': true,
    },
	'markerOptions': {
		'compact': true,
	},
	'height': 480,
} %}

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions