Gathering detailed insights and metrics for react-native-open-maps
Gathering detailed insights and metrics for react-native-open-maps
Gathering detailed insights and metrics for react-native-open-maps
Gathering detailed insights and metrics for react-native-open-maps
react-native-map-link
Open the map app of the user's choice with a specific location.
react-native-as-open-maps
Easily open maps and show route from current location to destination
@splicer97/react-native-osmdroid
This is unofficial React Native wrapper for osmdroid maps
@milad445/react-native-osmdroid
This is unofficial React Native wrapper for osmdroid maps
🗺 A simple react-native library to perform cross-platform map actions (Google, Apple, or Yandex Maps)
npm install react-native-open-maps
Typescript
Module System
Node Version
NPM Version
JavaScript (71.91%)
Java (14.48%)
Objective-C (10.5%)
Ruby (1.71%)
Starlark (1.41%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
363 Stars
140 Commits
47 Forks
3 Watchers
25 Branches
13 Contributors
Updated on Jun 19, 2025
Latest Version
0.4.3
Package Id
react-native-open-maps@0.4.3
Unpacked Size
22.79 kB
Size
7.72 kB
File Count
5
NPM Version
8.1.2
Node Version
16.13.1
Published on
Jul 17, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
🗺 A simple cross-platform library to help perform map actions to the corresponding device's map (Google, Apple, or Yandex Maps)
react-native-open-maps
works by creating a universal map link for either Apple, Google, and Yandex maps that can be used to open up the relevant map application. In order to maximize compatibility some platform specific parameters are omitted, but simplifies development efforts and ensures a smooth user experience.
Features
function
that will open the mapstring
of the map link1$ npm install --save react-native-open-maps
1import openMap from 'react-native-open-maps';
1import React, { Component } from 'react'; 2import { Button } from 'react-native'; 3import openMap from 'react-native-open-maps'; 4 5export default class App extends Component { 6 _goToYosemite() { 7 openMap({ latitude: 37.865101, longitude: -119.538330 }); 8 } 9 10 render() { 11 return ( 12 <Button 13 color={'#bdc3c7'} 14 onPress={this._goToYosemite} 15 title="Click To Open Maps 🗺" /> 16 ); 17 } 18}
1 - 1
mapping flavor 🍦.1import { createOpenLink } from 'react-native-open-maps'; 2 3const yosemite = { latitude: 37.865101, longitude: -119.538330 }; 4const openYosemite = createOpenLink(yosemite); 5const openYosemiteZoomedOut = createOpenLink({ ...yosemite, zoom: 30 }); 6 7const facebookHQ = { latitude: 37.4847, longitude: 122.1477 }; 8const openFacebookHQ = createOpenLink(facebookHQ); 9 10// Condensed for Readability... 11 render() { 12 return ( 13 <Button 14 color={'#bdc3c7'} 15 onPress={openYosemite} 16 title="Go to Yosemite 🏔" /> 17 <Button 18 color={'#bdc3c7'} 19 onPress={openFacebookHQ} 20 title="Go to Facebook HQ 🕋" /> 21 );
If you need additional examples, view the example directory for a demo you can run locally.
open(options)
react-native-open-maps
immediately opens the map of the coordinates and the settings
{ createOpenLink(options) }
Creates a delayed invoked function to open the map. This is useful for binding functions to onPress()
in a succinct manner. Think of it like ... function openToMe() { open(coordinates) }
{ createMapLink(options) }
Creates the raw link for the map.
{ createQueryParameters(options) }
Creates the query parameters for the designated maps provider. Useful if you want to override the base url and perform logic to override it with a native base URL.
Properties | Type | Description | Example | Map Support |
---|---|---|---|---|
latitude | number | The latitude | 37.865101 | All |
longitude | number | The longitude | -119.538330 | All |
zoom | number | The zoom level, only works with latitude and longitude | 18 Default: 15 | All |
provider | string [ google ,apple ,yandex ] | If no provider set, it will determine according to Platform.OS | apple | N/A |
query | string | Will act according to the map used. Refer to query property | "Yosemite Trail" | All |
queryPlaceId | string | Will query by Place ID. | ChIJgUbEo8cfqokR5lP9_Wh_DaM | |
travelType | enumeration : [drive , walk ,public_transport ] | Use this parameter in conjunction with start and end to determine transportation type. Default is drive | "drive" | All |
start | string that geolocation can understand | The start location that can be interpreted as a geolocation, omit if you want to use current location / "My Location". See Apple, Google and Yandex docs for more details on how to define geolocations. | "New York City, New York, NY" | All |
end | string that geolocation can understand. | The end location that can be interpreted as a geolocation. See Apple, Google and Yandex docs for more details on how to define geolocations. | "SOHO, New York, NY" | All |
waypoints | array : [address , address ] | Define intermediate addresses between a route. | ["San Jose, California", "Campbell, California"] | Apple (v16+) and Google |
endPlaceId | string | End destination with the use of a place ID that uniquely identifies a places. | ChIJgUbEo8cfqokR5lP9_Wh_DaM | |
navigate | boolean | This is only specific for Google. Yandex and Apple maps will provide directions if a start and end is provided. | true | |
mapType | enum : [standard , satellite , hybrid , transit ] | Specifies base map type. Note, hybrid is the satellite map with a transit layer, where as transit is the standard roadmap with a transit layer. | "hybrid" | All, except Yandex does not support "hybrid" |
Note:
To perform certain map actions refer these necessary parameters
end
, [ start
, travelType
]latitude
+ longitude
, [ zoom
]query
1createMapLink({ provider: 'apple', query: 'Yosemite National Park' });
1createMapLink({ provider: 'apple', query: 'Coffee Shop', latitude: 10.02134, longitude: -29.21322 })
1createMapLink({ provider: 'yandex', start: '1 Infinite Loop, Cupertino, CA', end: '1600 Amphitheatre Pkwy, Mountain View, CA' })
1createMapLink({ provider: 'google', end: 'New York City, NY' })
1createMapLink({ provider: 'google', end: 'East Brunswick, NJ' })
1createMapLink({ provider: 'google', end: 'New York City, NY', travelType: 'walking', mapType: 'hybrid' })
1createMapLink({ provider: 'google', start: 'SoHo, Manhattan, New York, NY', end: 'Times Square, Manhattan, NY', travelType: 'public_transportation' })
1createMapLink({ provider: 'apple', query: 'hiking trails', mapType: 'satellite' })
1createMapLink({ provider: 'yandex', latitude: 10.02134, longitude: -29.21322, zoom: 20 })
The query behavior differs per platform:
latitude
and longitude
is provided, this will place a marker with the query
as a label. If no latitude
or longitude
is provided, it will center map to closest query match. This will set a pin with label set to the query value.latitude
and longitude
if present and center map to closest query match. Without a query
, you may however use <latitude>,<longitude>
as a string value in the query to have a unnamed marker on the map.latitude
and longitude
is provided, this will place a point to show the accurate location. If no latitude
or longitude
is provided, it will center map to closest query match.Contributions are greatly appreciated! Prior to submitting PRs, please try to test your changes against the example application provided to make sure your changes do not break existing platforms. In addition, unit tests are recommended for new features or large changes.
To test your changes against the example application.
npm run example-test
cd example
npx react-native start
Your changes should not cause unexpected behaviors or warnings.
npm test
MIT © Brandon Him
If you like this repository, check out my other react-native projects or follow me for other open-source projects:
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/15 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More