OpenStreetMap Integration in react native application. Please guide me on that. I'm trying to show a pin point on current location & after selecting search criteria user can see the near by (within 1km) shops pin point on the map. asked 18 Nov '19, 11:36 Kailas B |
You will likely be using a Javascript library like Leaflet or OpenLayers to display a map, and then you will be constructing and sending a request to the Overpass API service that returns objects with certain tags within a certain distance from a given start point. You will want to learn/read up on how to display an OpenStreetMap map with Leaflet or OpenLayers, how you access the current position of the phone, how you write Overpass queries, and how you parse and display the results on the map (one option might be osmtogeojson). answered 18 Nov '19, 12:22 Frederik Ramm ♦ This will show default map with current location.
(18 Nov '19, 12:27)
Kailas B
https://wiki.openstreetmap.org/wiki/API_v0.6 find out these API but authentication URL & parameter is not given. Is anyone know?
(19 Nov '19, 07:04)
Kailas B
How can I show Map then in react native. not getting solution of show it. Can you provide any steps OR reference link.
(19 Nov '19, 11:53)
Kailas B
2
As Frederik says above, "You will want to learn/read up on how to display an OpenStreetMap map with Leaflet or OpenLayers, how you access the current position of the phone, how you write Overpass queries, and how you parse and display the results on the map". Taking this one at a time, the documentation on Leaflet is here. There are lots of tutorials there, but right on that front page is an example that displays a map with a marker on it. You have a couple of options for "how you access the current position of the phone" that vary by phone - a simple web search gets you to various options, and you can decide what is right for you. I'm not familiar with React Native, but it's entirely possible that there's an abstraction layer in there for location. Similarly, a web search for "how you write Overpass queries" points you at a couple of articles on the OSM wiki. It's pretty straightforward to use.
(19 Nov '19, 14:55)
SomeoneElse ♦
2
Another link that might be helpful is StackOverflow's "how to ask a good question". If you're really just confused and really don't know where to start, then take one (or several) steps backward until you can explain to people what you are familiar with and where your confusion starts. For example, if you aren't familiar with React Native (or Javascript) you'll need to learn how to do basic things there before being able to do anything with the answers to your question here.
(19 Nov '19, 15:00)
SomeoneElse ♦
showing 5 of 6
show 1 more comments
|
Can you explain in a bit more detail what you are actually trying to do? "OpenStreetMap" is just a big pile of data, and people use it for all sorts of things - they create maps from it, they calculate routes between A and B, they look up placenames, they use the data to statistically enquire about differences between regions. What is it you are actually trying to do?