In my React Native app, I need to generate a static google maps image with a dynamic address (like the image below). Once you press on the image, it needs to open up the google maps app to that same address. I looked at react-native-maps and it seems like overkill for what I want to achieve... Is there a way to embed a static google maps image in the app, put it inside a TouchableOpacity and just open google maps once you press on it?
You can use The Maps Static API to get the image
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap
&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318
&markers=color:red%7Clabel:C%7C40.718217,-73.998284
&key=YOUR_API_KEY
and https://www.npmjs.com/package/react-native-open-maps to open the map app.
i hope you got your answer.
Related
I'm working on a react native app using the react-native-share package to share an image to Instagram. I'm able to share the image to Instagram on iOS, but would like to display a url at the top left corner to tell others to view this post in our website.
It seems some apps can do this already like Spotify or Netflix or Soundcloud.
I've tried to use the package's Share.shareSingle method with the attributionURL: 'https://google.com', however, this doesn't display anything at the top.
Not found in the documentation either: https://developers.facebook.com/docs/instagram/sharing-to-stories/
Does anyone know how to implement this using the React Native package similar to the picture here: https://imgur.com/a/MEcthHd
And please provide documentation and a code example if possible, or how the link should be formatted. Thank you!
Is there anywhere i can use a similar function like the in react native to upload image and take picture? I need to push this function via code-push, if i'm using library like react-native-image-picker, i can't push it via code-push. Or is there any pure js library can achieve this?
This is not possible as the code you'd need to achieve what you want requires access to native APIs (read/write storage, camera, etc.). You will therefore need to push an actual update through the App Store and Google Play.
I want to show the current location with animation arrow and also place some dummy images(SVG images) on the map.
Please any one help for me.
There is a great library called react-native-maps where you can use google maps for both iOS and Android or use google maps for android and native apple maps for iOS.
Also this supports various animations and custom markers. You can use below link to find out uses of this library.
Link
I am working on a project to create a Uber clone. I will need to have a text input which will list predicted addresses like in the actual Uber app when user types in the text input. Once user selects the location, a map will be automatically updated.
Can I achieve this using the Google places web api alone, without touching native code? I know this can be achieved using react native google places (which needs to touch native code) but I am not comfortable toying with native codes.
If possible to achieve using Google places web api, anyone can share samples of how this is done? Tutorials online only show how to set markers for certain types only eg hotels which is not what I want to achieve. I m not sure what is the 'type' I should set when using Google places web api.
I use react native init to initialize my react native app
Thanks
i'm looking for pdf overlay feature to be implemented in iOS app, if whether its possible with libs free or even paid to have an touch overlay on PDF page within an app?
what i'm trying to do is i have a map which is train map and i want to have the map as pdf and any touch on station brings up info on each station.
is that posssible or what is other way to go forward open to every opinion!!!
i saw some other questions but none directed like this i.e.
Overlay Image above Embedded pdf
can any one tell me if its actually possible in objctive C code?
needs to work as offline app.
You can use Google Maps Static API (https://developers.google.com/maps/documentation/staticmaps/) to return an image on the map and then convert it to pdf.