How to create and customize cluster markers in React

  Рет қаралды 25,364

Google Maps Platform

Google Maps Platform

Күн бұрын

Пікірлер: 40
@GoogleMapsPlatform
@GoogleMapsPlatform Жыл бұрын
Subscribe for more Google Maps Platform tutorials! → goo.gle/GoogleMapsPlatform
@adamwoolf9993
@adamwoolf9993 10 ай бұрын
Leigh. The quality and clarity of your explanations, teaching style and of the video production is second to none IMO. Thanks so much for this and please keep up the great work!
@LifeWithSeb99
@LifeWithSeb99 8 ай бұрын
Could you make an example with dynamic points? Let's say we're loading new points from the server every time we drag the map - some of the points are new, and some of them are no longer there. I tried to that and it's not been successful...
@MaxI-fw1vv
@MaxI-fw1vv 11 ай бұрын
Very nice exercise! Are you able to zoom with "zoom" property, not "defaultZoom"?
@parladdgna
@parladdgna Ай бұрын
i m not able to zoom :(
@faridmammadov4277
@faridmammadov4277 4 ай бұрын
Thank you very much man !
@tantoniou
@tantoniou 7 ай бұрын
But how about custom icons for clustering? like svg's I mean
@amitd1927
@amitd1927 5 ай бұрын
developers.google.com/maps/documentation/javascript/examples/advanced-markers-graphics Check out, this is possible
@ninaandreeapopovici3264
@ninaandreeapopovici3264 5 ай бұрын
Every time I add a Center to my Map, it keeps me stuck I can't move the Map around. How can I bypass this issue?
@amitd1927
@amitd1927 5 ай бұрын
Anyone facing issues with the zoom, Do change "Center" to defaultCenter and "Zoom" to defaultZoom. For example: defaultZoom={8} defaultCenter={{ lat: 18.9499412, lng: 72.9486126 }}
@InfiNity-jw9hc
@InfiNity-jw9hc 5 ай бұрын
same issue, have you found any solution?
@AngelaYuGoogle
@AngelaYuGoogle 5 ай бұрын
See this example of setting an initial state of the map including center, but then updating the state of the map whenever the user changes the map state visgl.github.io/react-google-maps/examples/multiple-maps
@coding-soju
@coding-soju 4 ай бұрын
This is late but, you need to use defaultCenter.
@parladdgna
@parladdgna Ай бұрын
@@coding-soju also defaultZoom
@developerism_
@developerism_ Жыл бұрын
Is it possible to create a React JS app, which provides navigation as google maps+ pop ups the images and snaps of nearby picnic spots? If yes, which APIs will be needed? Can you please make a tutorial for it?
@yeetergonzales832
@yeetergonzales832 4 ай бұрын
Hello, is there a way to set zoom/pan to the lowest level of cluster markers? I don't get animations to center positions of a cluster, it sort of just jumps there, and the panTo and setZoom dont really help for some reason
@oleksandr1006
@oleksandr1006 6 ай бұрын
Hi, I wrote everything according to the instructions. I receive markers from requests to the API of the delivery service. If I show up to 1000 markers, then everything works fine. But I need to display 30,000 delivery points across the country. If I do this, the page freezes and nothing is shown on the map. But in many online stores, everything works. I also wrote an option to connect the map in pure JavaScript without clustering. All 30,000 markers are drawn. I don't have much experience to write my own clusterizer. But the option using libraries does not work. Please advise. Or write a guide on how to draw at least 10,000 markers.
@11King99
@11King99 Жыл бұрын
It doesn't work when you trying to add new marker to the map.
@nazariisaviak6298
@nazariisaviak6298 11 ай бұрын
The same issue...
@tsemibhutia4810
@tsemibhutia4810 11 ай бұрын
​@@nazariisaviak6298 you need to rerun the clustering method
@amitd1927
@amitd1927 5 ай бұрын
Anyone facing issues with the zoom, Do change "Center" to defaultCenter and "Zoom" to defaultZoom. For example: defaultZoom={8} defaultCenter={{ lat: 18.9499412, lng: 72.9486126 }}
@JonnyOrtiz-wu8ii
@JonnyOrtiz-wu8ii 11 ай бұрын
How do you add an InfoWindow for each? I'm having trouble trying to figure out how to implement the ref since the ref in the demo is a callback.
@adamwoolf9993
@adamwoolf9993 10 ай бұрын
If you put the marker in its own component you can handle the state per marker.
@mohammadeslim9929
@mohammadeslim9929 4 ай бұрын
when i use the same workflow for like 50k markers the app crashes, any solutions ?
@oleksandr1006
@oleksandr1006 5 ай бұрын
To paint a pair of markers is absolutely not a practical task. Here is the task I decided: to draw 30 thousand delivery service markers across the country, which I receive in response to a request to their API. I figured out how to draw only those markers and clusters that fall into the map display grid. The map began to fly, because when trying to draw all 30 thousand, the page froze. It will probably be necessary to record a guide for KZbin, because there is no video for such a practical task on all of KZbin.
@amitd1927
@amitd1927 5 ай бұрын
if you're facing, then refer the github code of examples, that way I was able to resolve the issue of "Maximum update depth exceeded"
@jismonEnsol
@jismonEnsol 4 ай бұрын
How can I change the color of clusters?
@daltonrandall4348
@daltonrandall4348 6 ай бұрын
Is typescript mandatory to use map clusters now, or can you still use normal javascript in the HTML page?
@chriscwc
@chriscwc 5 ай бұрын
No, typescript is optional.
@daltonrandall4348
@daltonrandall4348 5 ай бұрын
@@chriscwc Thanks so much. I find it so difficult to figure out how to embed these things without massive amounts of hassle.
@youtubechoices
@youtubechoices 6 ай бұрын
is this using the new cluster that google will be using from now on?
@obakengdiphoko7655
@obakengdiphoko7655 9 ай бұрын
how do you enable zoom in and out?
@amersyu1458
@amersyu1458 9 ай бұрын
instead of passing zoom into your map component, pass in defaultZoom. So upon rendering the map will have the defaultZoom value but enable user to zoom in and out.
@kpoplightsticks1443
@kpoplightsticks1443 9 ай бұрын
How can I change the numbers on clusters to Arabic numbers? Thanks
@sumithme4305
@sumithme4305 6 ай бұрын
Did you manage to find this
@kpoplightsticks1443
@kpoplightsticks1443 6 ай бұрын
@@sumithme4305 Yes, I am using @react-google-maps/api and I changed it by customizing the calculator of MarkerCluster
@AngelaYuGoogle
@AngelaYuGoogle 5 ай бұрын
Here's the reference documentation for the js-markerclusterer library that is powering this marker clustering, where the default renderer uses a String(count) of the markers for the Label of the marker. You can change the Label of the cluster's marker to be a different String. googlemaps.github.io/js-markerclusterer/classes/DefaultRenderer.html
@جعفر-س7ت
@جعفر-س7ت Жыл бұрын
❤❤
How to show directions on a map in React
21:30
Google Maps Platform
Рет қаралды 19 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,6 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 361 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 193 М.
[Webinar] How to Build a Modern Agentic System
1:00:55
Arthur
Рет қаралды 13 М.
7 React Lessons I Wish I Knew Earlier
7:30
Code Bootcamp
Рет қаралды 77 М.
How to use data-driven styling in React
23:56
Google Maps Platform
Рет қаралды 10 М.
How to load Maps JavaScript API in React (2023)
6:31
Google Maps Platform
Рет қаралды 84 М.
NVIDIA CEO Jensen Huang's Vision for the Future
1:03:03
Cleo Abram
Рет қаралды 536 М.
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН