```tsx import { VectorSource } from '@rnmapbox/maps'; VectorSource ``` VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. ## props ### id ```tsx string ``` A string that uniquely identifies the source. _defaults to:_ `Mapbox.StyleSource.DefaultSourceID` ### existing ```tsx boolean ``` The id refers to an existing source in the style. Does not create a new source. ### url ```tsx string ``` A URL to a TileJSON configuration file describing the source’s contents and other metadata. ### tileUrlTemplates ```tsx Array ``` An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints. Example: https://example.com/vector-tiles/{z}/{x}/{y}.pbf [Third Party Vector Source](../examples/LineLayer/ThirdPartyVectorSource) ### minZoomLevel ```tsx number ``` An unsigned integer that specifies the minimum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than maxZoomLevel, if specified. The default value for this option is 0. ### maxZoomLevel ```tsx number ``` An unsigned integer that specifies the maximum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than minZoomLevel, if specified. The default value for this option is 22. ### tms ```tsx boolean ``` Influences the y direction of the tile coordinates. (tms inverts y axis) ### attribution ```tsx string ``` An HTML or literal text string defining the buttons to be displayed in an action sheet when the source is part of a map view’s style and the map view’s attribution button is pressed. ### onPress ```tsx func ``` Source press listener, gets called when a user presses one of the children layers only if that layer has a higher z-index than another source layers - `event`: `Object` - `event.features`: `Object[]` - the geojson features that have hit by the press (might be multiple) - `event.coordinates`: `Object` - the coordinates of the click - `event.point`: `Object` - the point of the click *signature:*`(event:OnPressEvent) => void` ### hitbox ```tsx type Hitbox = { width: number; /* `width` of hitbox */ height: number; /* `height` of hitbox */ } ``` Overrides the default touch hitbox(44x44 pixels) for the source layers ### children ```tsx React.ReactElement | React.ReactElement[] ``` FIX ME NO DESCRIPTION ## methods ### onPress(event) #### arguments | Name | Type | Required | Description | | ---- | :--: | :------: | :----------: | | `event` | `NativeSyntheticEvent` | `Yes` | undefined |