Home > General Components > AutoMap

AutoMap

@wq/map’s <AutoMap/> component reads the map configuration corresponding to the current route and renders a <Map/> with the appropriate inputs and controls

The typical component hierarchy generated by <AutoMap/> is as follows:

<AutoMap>
  <Map>
    <MapInteraction />
    <Legend>
      <BasemapToggle>
        <AutoBasemap>
          <Tile />
        </AutoBasemap>
      </BasemapToggle>
      <OverlayToggle>
        <AutoOverlay>
          <Geojson />
        </AutoOverlay>
      </OverlayToggle>
    </Legend>
  </Map>
</AutoMap>

Source

The source code for <AutoMap/> is available here:

  • AutoMap.js (@wq/map)

This component should not generally need to be overridden directly.