Property "optimized" is not working on Marker component
See original GitHub issueUsing react-google-maps version 4.11.0.
I am trying get a specific marker rendered as image and also apply z-index on it. But somehow it is not happening.
- Property Object:
myLocationMarker: {
position: {
lat: anyValidLatitude,
lng: anyValidLongitude,
},
title: 'Your Location',
icon: '/path/to/image.imageFormat',
defaultAnimation: 2,
optimized: false,
zIndex: 1000,
}
- Marker:
<Marker {...myLocationMarker} />
The marker is getting rendered on map without any error. But not as an individual image.
Please, let me know if it is possible and also the proper way to do it. Any kind of workaround is appreciated.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Marker | Maps JavaScript API - Google Developers
Optimization enhances performance by rendering many markers as a single static element. This is useful in cases where a large number of markers...
Read more >Google Maps Unoptimized Marker / fitBounds - Stack Overflow
I have come across an issue wherein calling google.maps.Map.fitBounds() causes markers to be removed from the DOM when un-optimized markers are ...
Read more >Optimize React Native Map in Your Applications [A How To ...
1. Turn off trackViewChanges in custom Markers when not needed · 2. React.memo, or shouldComponentUpdate, or PureComponent · 3. Use “icon” instead ...
Read more >Introduction to React Native Maps - LogRocket Blog
In this guide, we'll demonstrate how to integrate Google Maps into your React Native application and introduce you to fundamental components ...
Read more >Working With the Map Component - Jaspersoft Community
If you are using the default marker, you can set additional properties, such as color, label, etc. These properties are not available for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@techboy-zero here is how you should do it:
Thanks a lot! Now it works as expected.