0.1.5 • Published 11 months ago

react-native-azure-map v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

react-native-azure-maps

react native component for microsoft azure maps unofficial

Installation

npm install react-native-azure-map

Usage

import { AzureMap } from 'react-native-azure-map';

// ...
<AzureMap apiKey={}  latitude={31.5} longitude={10} zoom={10} >
  <AzureMarker position={} htmlIcon={}></AzureMarker>
</AzureMap>

AzureMap Props

Prop NameTypeRequiredDefaultDescription
latitudenumberYesnullThe longitude of the map's initial center.
longitudenumberYesnullThe latitude of the map's initial center.
styleobjectNo{}The style object to customize the map container.
onMapReadyfuncNonullCallback function that is called when the map has finished loading.
apiKeystringYesnullAzure Maps subscription key required for authenticating API requests.
zoomnumberNo7The initial zoom level of the map.
mapStyleModestringNograyscaleThe visual style of the map. Can be one of: 'grayscale', 'road', 'satellite', 'night', etc.
baseUristringNonullThe base URI for loading the Azure Maps JavaScript SDK.
baseCssUristringNonullThe base URI for loading the Azure Maps CSS.
childrennodeNonullChild components such as markers, which can be added to the map.

AzureMarker Props

Prop NameTypeRequiredDefaultDescription
positionarrayYes[0, 0]The [latitude, longitude] array that defines the position of the marker.
htmlIconstringYesnullThe HTML content that will be displayed inside the marker.
injectJavaScriptfuncYesnullA function to inject JavaScript into the WebView to create the marker.
draggablebooleanNofalseDetermines if the marker can be dragged.
colorstringNo'#1A73AA'The primary color of the marker.
secondaryColorstringNo'white'The secondary color of the marker (e.g., for borders or other elements).
anchorstringNo'bottom'Determines how the marker is anchored relative to its position. Can be one of 'center', 'left', 'right', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right'.

Example

<AzureMap apiKey={}  latitude={31.5} longitude={10} zoom={10} >
</AzureMap>

gaza goelocation

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago