简体   繁体   中英

limit to combination of Fusion Table layers and KML layers in Google Maps API V3

This earlier question relates to mine Google Maps Number of KML layers limit , but I'm trying to find out if there is some sort of a limit on maps combining Fusion Table layers and KML layers.

I have a map ( http://openlandsmaps.org/GIS1/html/Community_Greening/Visioning/OpenlandsCookVisioning12.html ) within the 5 Fusion Table layer limit which incorporates additional KML layers. These layers toggle on and off with check boxes. I cannot get the final two layers in the list to display, though they display fine when their code is isolated.

I get errors in your code:

Uncaught ReferenceError: park is not defined OpenlandsCookVisioning12.html:186
Uncaught ReferenceError: GreenHealth is not defined OpenlandsCookVisioning12.html:94
Uncaught ReferenceError: TreeKeeper is not defined OpenlandsCookVisioning12.html:104

There is a limit on KmlLayer based on the total length of all the URLs passed into the class (but that isn't your problem). Your problem is the first error. "park" is not defined in this line:

park.setMap(null);

that line should be:

Acc77.setMap(null);

the lines following that which define the GreenHealth layer and the TreeKeeper layer are not executed due to the error.

To address the KmlLayer limit question, from the documentation :

There is a limit on the number of KML Layers that can be displayed on a single Google Map. If you exceed this limit, none of your layers will display. The limit is based on the total length of all URLs passed to the KMLLayer class, and consequently will vary by application; on average, you should be able to load between 10 and 20 layers without hitting the limit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM