0

Error

Type '{ coordinate: { latitude: number; longitude: number; }; image: { uri: string; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'. Property 'coordinate' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.

Code:

<MapView style={styles.map} region={mapRegion}>
        <Marker
          coordinate={{latitude: 36.261389434851296, longitude: -88.17070353357855}}
          image={{uri: 'OIP-removebg-preview.png'}}
        />
</MapView>

Imports:

import { StyleSheet, Image, Platform, View } from 'react-native';
import MapView from 'react-native-maps';
import Marker from 'react-native-maps';
import React, { useState } from 'react';

Tried to check imports, everything matches up. Documentation matches documentation provided online.

2
  • Could you show your imports Commented May 22 at 19:23
  • @PhantomSpooks coordinate should be packaged with Marker
    – Beanz
    Commented May 23 at 19:17

0

Browse other questions tagged or ask your own question.