react-native-leaflet
react-native-leaflet copied to clipboard
Marker offset
Hi, I am having a marker offset.

Targeting the Hôtel-Dieu of Paris, the popup is exactly where I want the blue marker to be.
Here is my code:
// App.js
import React from "react"
import { LeafletView } from "react-native-leaflet-view"
export default function App() {
const [position] = React.useState({
lat: 48.854665,
lng: 2.34889,
})
return (
<LeafletView
mapCenterPosition={position}
mapMarkers={[
{
position: position,
title: "Hôtel-Dieu de Paris",
icon: "https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png",
size: [50, 82],
iconAnchor: [25, 82],
},
]}
/>
)
}
Please note that the original picture size is 50x82
, it is the reason why I put ... size: [50, 82], ...
.
Please tell me what am I doing wrong?
have you tried changing iconAnchor: [25, 82]
to iconAnchor: [50, 82]
or iconAnchor: [0, 82]
?
Is there a way to remove the 'x' from the bubble?