使原生地图不显示多个标记

时间:2018-03-07 05:50:11

标签: reactjs react-native react-native-maps

您好我使用反应原生地图https://github.com/react-community/react-native-maps,并且由于一些奇怪的原因,一次不会显示多个标记。这有什么问题?它只显示第一个标记。我没有尝试映射坐标数组,但最后映射将与此代码相同。

我已经初始化了所有LATITUDE和LATITUDE DELTA等等。

render() {
    return (
        <View>
          <MapView
            provider={PROVIDER_GOOGLE}
            showsUserLocation={ true }
            showsMyLocationButton={ true }
            followsUserLocation={true}
            customMapStyle={MapStyle}
            region={{
              latitude: LATITUDE,
              longitude: LONGITUDE,
              latitudeDelta: LATITUDE_DELTA,
              longitudeDelta: LONGITUDE_DELTA,
            }}>
            <MapView.Marker
              coordinate={{
                latitude: 30.7432680, 
                longitude: -90.3718372
              }}
              key={12313}
              title={"title"}
              />
            <MapView.Marker
              coordinate={{
                latitude: 30.7432697, 
                longitude: -90.3718363
              }}
              key={12314}
              title={"Another"}
              />
            </MapView>

        </View>

    );
  }

0 个答案:

没有答案