截至 2022 年,React Native Maps 是否仍然免費,或者是否在任何 Google 定價串列中?
我在 Reddit 上讀過這一行,但那是 2 年前
“通過嵌入谷歌地圖react-native-maps確實需要一個 API 密鑰,但它是免費的。可以確認,因為我有一個 10 萬用戶的應用程式并且沒有為地圖支付一分錢。”
我不確定它是否仍然相同。
這是我的使用方式:
import { StyleSheet, Text, View, Button } from "react-native";
import MapView, {
PROVIDER_GOOGLE,
MAP_TYPES,
PROVIDER_DEFAULT,
UrlTile,
Marker,
} from "react-native-maps";
import React, { useEffect } from "react";
export default function Home({ navigation }) {
let location = {
latitude: 30.259933,
longitude: 31.412613,
latitudeDelta: 0.009,
longitudeDelta: 0.009,
};
return (
<View style={styles.container}>
<View style={styles.myMap}>
<MapView
style={{ flex: 1 }}
showsUserLocation
PROVIDER_GOOGLE
MAP_TYPES="STANDARD"
>
<Marker
title="Home"
coordinate={{
latitude: location.latitude,
longitude: location.longitude,
}}
/>
</MapView>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#ffd",
alignItems: "center",
justifyContent: "center",
},
myMap: {
flex: 2,
backgroundColor: "white",
width: "100%",
marginTop: 30,
marginBottom: 30,
},
map: {
width: "100%",
height: "100%",
},
});
我需要澄清一下
uj5u.com熱心網友回復:
請參閱
如果您使用地圖 ID,您將需要付費。(這是新功能)

轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/427066.html
上一篇:谷歌地圖-遍歷陣列以獲取折線
