teovillanueva / react-native-web-maps

Cross platform maps for react & react-native 🗺
https://teovillanueva.github.io/react-native-web-maps/
MIT License
54 stars 14 forks source link

Custom Image Marker Support #34

Open alyjan opened 9 months ago

alyjan commented 9 months ago

When will custom image markers be supported through the Marker component? I see it's planned per the documentation but no timeline is given. Currently any value passed into image prop is ignored

  <Marker 
      coordinate={coordinate} 
      onPress={onPress} 
      image={image} />
IgorErmakov commented 3 months ago

Got the same issue. Really missing this property :( We're writing polygon my markers and it looks a bit ugly with classic ones.

omardlhz commented 3 months ago

You can add a custom marker by adding a View or whatever you want inside the <Marker> tag. For example:

<Marker coordinate={{ latitude: 35.2156095, longitude: -80.8570135 }}>
    <img src="https://cataas.com/cat" width={50} height={50} />
</Marker>

Will generate:

image
IgorErmakov commented 3 months ago

Thank you very much.

On 25 Apr 2024, at 07:16, Omar De La Hoz @.***> wrote:

You can add a custom marker by adding a View or whatever you want inside the tag. For example:

<Marker coordinate={{ latitude: 35.2156095, longitude: -80.8570135 }}>

Will generate:

image.png (view on web) https://github.com/teovillanueva/react-native-web-maps/assets/8744329/203013b7-c2a7-4d88-b3f8-595b560e26d3 — Reply to this email directly, view it on GitHub https://github.com/teovillanueva/react-native-web-maps/issues/34#issuecomment-2076328344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZJ6BYHYW3EWMWKDVJ6OTY7B7TDAVCNFSM6AAAAAA552C3G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZWGMZDQMZUGQ. You are receiving this because you commented.