ivan wang ivan wang - 1 year ago 216
React JSX Question

How do I set a marker in MapView of React Native

  • I want to set a marker on MapView in React Native, but I can't find any information through official documents of MapView.

  • If it is not allowed in that way, how can I use existed react module such as react-googlemaps in React Native?

Answer Source

You can set markers using the annotations prop.

For example:

var markers = [
    latitude: 45.65,
    longitude: -78.90,
    title: 'Foo Place',
    subtitle: '1234 Foo Drive'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download