我正在尝试使用AirBnb贴图(使用MapView.Markers)渲染一个按钮,我可以使用该按钮重定向到描述页面中的另一个页面(如果选择标记,则弹出框).我不知道如何实现这一目标.
目前我的标记如下:
const markers = [{
longitude: 8.545592,
latitude: 47.366465,
description: "Bike 1",
title: "Bike 1"
},
{
longitude: 8.545892,
latitude: 47.366365,
description: "Bike 2",
title: "Bike 2"
}
];
Run Code Online (Sandbox Code Playgroud)
每当我尝试将JSX输入到文本中时,我都会收到NSMutableDictionary cannot be converted to NSString错误.(当我这样做时:
const markers = [{
longitude: 8.545592,
latitude: 47.366465,
description: <Text>Bike1</Text>, //"Bike 1", //<Text> Bike1 </Text>
title: "Bike 1"
},
{
longitude: 8.545892,
latitude: 47.366365,
description: "Bike 2",
title: "Bike 2"
}
];
Run Code Online (Sandbox Code Playgroud) maps react-native airbnb-js-styleguide react-native-android react-native-ios