Weopt / react-native-here-maps

A react native module to display HERE maps
18 stars 18 forks source link

Click marker #3

Open yasaricli opened 5 years ago

yasaricli commented 5 years ago

Hello;

Could it be a simple application like the following?

Markers:

const markers = [
  {
    latitude: 41.0872972,
    longitude: 29.0023211,
    title: 'example 1',
    description: 'example 1 description',
  },

  {
    latitude: 41.0872972,
    longitude: 29.0023211,
    title: 'example 2',
    description: 'example 2 description',
  }
];

MapView

<MapView
  style={{ flex: 1, backgroundColor: '#FFF' }}
  center={`41.0872972,29.0023211`}
  markersList={markers}
  mapType="normal"
  initialZoom={17}
  onClickMarker={(marker) => {
    console.log(marker.title); // example 1
  }}
/>

Thanks.

Nahani commented 5 years ago

The parameter is not currently implemented but you can easily implemented if you want.

Regards,

yasaricli commented 5 years ago

@Nahani thanks, soon i will integrate it.

andersampa commented 5 years ago

Hi, I`v implemented markers to Android but I tried a lot of times to IOS without success.

Could you tell me how to do that ?