Skip to content

I am facing issues after installed npm reac-native-maps .mapview i can view it but adding marker getting attached screen error #5339

@MohanNB

Description

@MohanNB

Summary

`import React from "react";
import {
View,
StyleSheet,
} from "react-native";
import MapView, { MapMarker, Marker } from 'react-native-maps';
const MapListView = () => {
console.log("Marker",Marker);

return (
    <View style={{flex:1}}>
        <MapView
        style={{flex:1}}
        showsUserLocation = {true}
			    showsMyLocationButton = {true}
          initialRegion={{
            latitude: 37.78825,
            longitude: -122.4324,
            latitudeDelta: 0.0922,
            longitudeDelta: 0.0421,
          }}>
           
         
   <Marker
    coordinate={{ latitude: 37.78825, longitude: -122.4324 }}
  />
    
    </MapView>
  </View>
);

};

const styles = StyleSheet.create({

headerText: {
  fontSize: 16,
  fontWeight: "500",
  fontFamily: "Poppins",
  color:'#061926'
},
customMarker: {
  backgroundColor: 'blue',
  padding: 8,
  borderRadius: 5,
},
text: {
  color: 'white',
},

});

export default MapListView;
[`](

Image

)

Reproducible sample code

<MapView
            style={{flex:1}}
            showsUserLocation = {true}
				    showsMyLocationButton = {true}
              initialRegion={{
                latitude: 37.78825,
                longitude: -122.4324,
                latitudeDelta: 0.0922,
                longitudeDelta: 0.0421,
              }}>
               
             
       <Marker
        coordinate={{ latitude: 37.78825, longitude: -122.4324 }}
      />
        
        </MapView>

Steps to reproduce

simple need to create sample project and add mapview then add single marker inside mapview .

Expected result

I have tried many solution but i can't fix it. how to solve the attaced screen issues latest version

Actual result

I have tried many solution but i can't fix it. how to solve the attaced screen issues latest version

React Native Maps Version

1.20.1

What platforms are you seeing the problem on?

iOS (Apple Maps)

React Native Version

20

What version of Expo are you using?

Not using Expo

Device(s)

iPhone 15

Additional information

I have tried many solution but i can't fix it. how to solve the attached screen issues latest version

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions