Rolando
Rolando

Reputation: 62596

How to draw millions of points on google maps?

I have millions of points I want to draw on google maps coming from an array.

I was looking at circles example

However, the problem is circles are... circles. Is there some way to draw circles such that it is like a canvas so it doesnt really matter how many points I draw on it?

Upvotes: 12

Views: 2461

Answers (2)

Ronnie Smith
Ronnie Smith

Reputation: 18555

I believe the answer is don't. That's too many markers. Per the table below (grabbed from geek.com) you would have a screen with nothing but markers and no map, even if each marker were only 1 pixel each, which they aren't.

enter image description here

Upvotes: 6

xomena
xomena

Reputation: 32110

There are ready solutions for marker clustering like Markerclusterer or Markerclustererplus.

You can find these libraries on github:

https://github.com/googlemaps/v3-utility-library/tree/master/markerclusterer

https://github.com/googlemaps/v3-utility-library/tree/master/markerclustererplus

Sample pages and documentation are inside these repositories. Could it work for you?

Upvotes: 6

Related Questions