如何将OpenStreetMap集成到本机项目中? [英] How to integrate OpenStreetMap into a react-native project?
问题描述
我正在尝试将OpenStreetMap集成到React Native项目中.但是我在他们的GitHub帐户中找不到任何库或与React Native相关的任何东西.
我唯一能找到的与这些主题相关的东西是下面的链接,其中没有适当的答案.
但是我曾经听说Mapbox使用OpenStreetMap作为其源.Mapbox提出了一种将其集成到React Native项目中的好方法:
https://github.com/mapbox/react-native-mapbox-gl
有没有一种方法可以将OpenStreetMap集成到React Native项目中还是没有适当的支持.
您可以在 react-native-maps
包中使用自定义的Tile Overlay(也是OpenStreetMap):their GitHub account.
The only thing I can find relating to these to topics is the link below, in which there is no proper answer.
But I heard once that Mapbox uses OpenStreetMap as their source. Mapbox suggests a good way to integrate it into a React Native project:
https://github.com/mapbox/react-native-mapbox-gl
Is there a way to integrate OpenStreetMap into a React Native project or is it the case there's not proper support for it yet.
You can use a custom Tile Overlay (OpenStreetMap too) in react-native-maps
package: https://github.com/react-native-maps/react-native-maps
(scroll to Using a custom Tile Overlay section)
You need to add api key. You don't need to use Maps API at all and the key won't be used in that case.
这篇关于如何将OpenStreetMap集成到本机项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!