Skip to content

BasemapToggleControl

andy.rothwell edited this page Sep 26, 2019 · 3 revisions

BasemapToggleControl

A BasemapToggleControl is a custom widget that can be added to a Leaflet map.

The props that can be passed to a phila-vue-mapping BasemapToggleControl are:

prop description or example
position

In a Vue template

The <basemap-toggle-control> tag is put inside a <map_> tag:

<map_>
  ...
  <div v-once>
    <basemap-toggle-control v-if="shouldShowImageryToggle"
                            v-once
                            :position="'topright'"
    />
  </div>
  ...
</map_>

In a Mapboard config file

If using Mapboard, the BasemapToggleControl is automatically included on the map if you include any layers of type "imagery". You can cancel that with the following code in your config:

imagery: {
  enabled: false
},