knightOfSpring
knightOfSpring

Reputation: 359

fusion tables limitation

I want to create a web site using google maps and fusion tables where users can leave a marker on a map with message so that another users will be able to see this marker on their map. And all of this in a real time.

I've already created a small prototype. And i've got a question: Google has a limitations on using FT

So users won't be able to see a markers that placed further than 100.000 one:

Therefore, if you apply a filter to a very large table and the filter matches data in rows after the first 100K, these rows are not displayed.

How can i overcome this limitation? Or it's better to create my own database and use a marker cluster to work with large amounts of markers and therefore to forget about FT?

Upvotes: 1

Views: 477

Answers (2)

user2437016
user2437016

Reputation: 120

At your broadest view, where you are threatened by the 100k limit use the following algorithm

Union(Newest 50k records, Random sample 50k records from all older)

and plot this "limited" set. There is no way that view is actually going to display each single point to your user.

When he zooms in, grab the current viewing dimensions thru JS, and filter your DB records fro those within the viewing area.

This means, 1st you'd call to see if the filter returns 100k (thus meaning there's proabably 100k+ records that could be displayed) apply the random sampling algo again to reduce to 100k. If the filter returns <100k, then you no longer need to random sample and you are no longer threatened by the limit.

Upvotes: 0

Eric Bridger
Eric Bridger

Reputation: 3794

AFAIK there is no way around the 100K limitation. Perhaps a Google Premier license, costing money, would allow you to overcome this, I'm not sure. Another possibility is to maintain 5 Fusion Tables, each with a maximum of 100K rows. You can display 5 Fusion Table layers at a time via the GMap API. Don't see why this wouldn't work. You'd just have to run your query code against all the current layers. I've done this with 2 layers (both much smaller than 100K) but it worked fine.

Upvotes: 1

Related Questions