Multiple KMLLayers cause a 414 uri to large error. GET vs POST

443 views
Skip to first unread message

Brandon Donnelson

unread,
Jan 28, 2012, 12:29:23 AM1/28/12
to google-map...@googlegroups.com
Using 3 to 5 long kmz urls causes the request url (depending on the kmz url size) to the Google Maps server to be to large. 

What are the options to to load multiple KML urls with out hitting the GET URI length limit? (with out combining them?)

For example, this is a decoded request broken down into groups. Why can't this POST instead of GET?

http://mt1.googleapis.com/mapslt?hl=en-US&lyrs=

kml:cXOw0bjKUSgFR2OVf9nmPejwtrABFAtJIOUxtKSihmjwVqGYgTdwYuSaMOxNDozRSDlNbChp3JiCNlMPUloIS-_i2CI3SSDmswEUKdFcgYc50KAFrzODIBxqlkXJYgYsU6K5AwpzpUALWmMGRj4IbC45TcHxm2tQdP3Om4xPCqxgc-djgJGZnUrguF3mGPGUnBEqtYg-qCcA5mDE3iYkgxAyWBRNCLjBqPnHwlWVeMDHYiBfIWijOVytSDPjwCuOtat4VZ4uY8IubD_BRFiLFXlLz_MT58hXnpwfgyYZWBYU8Czhy4MCZBUvWQnwZ8ZUSZSkzAQLtDQziw51BiIQkR54sK25y7AS5cWfONLSQBeuJwKZs6IRgwYD9BADPBODOJkSf_IsZMmTLUUy2kC83HnJMpBjyK0-AQOhyZRtq4USYBLzYMhRlzIaNLWEy4nwZsOLFaELwghyDicGLtWAhy0nAkyVTLmwlWXLgw4K_7xZy4MaMB4tAwYnBeQIwEWc3PUsmMvzYC_LkUYToQm4C4hOA0cSYBBOiYl4YWE0ANhMBTjwFuTCcCBOk9sQ0wpQHX0bcixgFSzKaIGKcGRYXykTJRo7zRBBjE8JMmgsjnpNgYkwE5hOCfwjXCcBammUoMxYSrI3hzU-SOwcejCcIe2Gm3MTUJslGmi2zALZMUiZlRGblJjT9IG0_iEK1Sw|ks:;dc:cg|kv:3|api:3,

kml:cXOw0bjKUSgFR2OVf9nmPejwtrABFAtJIOUxtKSihmjwVqGYgTdwYuSaMOxNDozRSDlNbChp3JiCNlMPUloIS-_i2CI3S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tiwES2zDdAIQ4aMxXlPDL6wFmQNB34TggWbYDkek4AVuxCugmWOQikjMis3oekHaftBFKpdAg|ks:;dc:mh|kv:3|api:3&x=3&y=4&z=11&w=256&h=256&source=apiv3&token=67294

Brandon Donnelson

Rossko

unread,
Jan 28, 2012, 7:06:07 AM1/28/12
to Google Maps JavaScript API v3
> What are the options to to load multiple KML urls with out hitting the GET
> URI length limit? (with out combining them?)

Shorter names?
Network Link?
http://code.google.com/apis/kml/documentation/kml_tut.html#network_links

Emil Egredžija

unread,
Mar 3, 2012, 2:42:03 PM3/3/12
to google-map...@googlegroups.com
Hi.

I am having the same problem. When more than cca. 10 KML layers are to be displayed on a map, the request url is to large,  and i get "NetworkError: 414 Request-URI Too Large.

Did you find any resolution to this problem ?

Tnx.
Emil

Brandon Donnelson

unread,
Mar 4, 2012, 6:35:36 PM3/4/12
to google-map...@googlegroups.com

Use network links. :)

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/kKUwYG8xMCgJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

egremyl

unread,
Mar 6, 2012, 5:42:13 AM3/6/12
to google-map...@googlegroups.com
Hm.
I have a scenario where i do a json call, and it returns array of objects. Each json object is a geo location, either a gmap marker or route/polyline. Every object has properties: id, name, description, kml_url. Kml_url is used to draw a object's kml on a map, through the new google.maps.KmlLayer(...) call. Every created kmlLayer is bound to its json object, so it can be manipulated (show/hide) through that object. Then, every kmlLayer get it's mouse click event listener with google.maps.event.addListener(...), and the response is dynamicaly generated from the kml's json object attributes (it grabs the id attribute and through another json call it displays object's details).

So, if i use the network links, how can i bind "child" kmls, which are defined in NetworkLink element, to a json object, and register it's event listener ? AFAIK, i can only call new google.maps.KmlLayer(...) on a "parent" kml, and all the "child" kmls in a NetworkLink-s, are automatically displayed by google maps ...




On Monday, March 5, 2012 12:35:36 AM UTC+1, Brandon Donnelson wrote:

Use network links. :)

To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

On Monday, March 5, 2012 12:35:36 AM UTC+1, Brandon Donnelson wrote:

Use network links. :)

To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.

Rossko

unread,
Mar 6, 2012, 4:04:37 PM3/6/12
to Google Maps JavaScript API v3
> I have a scenario where i do a json call, and it returns array of objects.
> Each json object is a geo location, either a gmap marker or route/polyline.
> Every object has properties: id, name, description, kml_url. Kml_url is
> used to draw a object's kml on a map,

Is there some compelling reason to use KmlLayer in this way? It
strikes me that its become more trouble for you than its worth for
displaying a handful of 'intereactive' geometries.

You could keep your KML data structure and render as ordinary
overlays, see GeoXml3

Emil Egredzija

unread,
Mar 6, 2012, 4:16:48 PM3/6/12
to google-map...@googlegroups.com

I just did that today ! :-)
GeoXML3 works superbly, i just couldnt believe that it draws and renders large amount of kml files instantly. Especially on Chrome.

I tought that kml server-side rendering was the fastest way to display large amount of polylines and markers. Was very wrong.

geoco...@gmail.com

unread,
Mar 6, 2012, 5:12:10 PM3/6/12
to Google Maps JavaScript API v3
That is all a matter of the processing power and browser you are
using. Client-side parsing works OK for powerful modern machines
running modern browsers.

Server-side tile generation (KmlLayer/FusionTablesLayer) will be
better for large data sets on older computers/browsers or mobile
browsers.

Larry

egremyl

unread,
Mar 13, 2012, 3:26:18 AM3/13/12
to google-map...@googlegroups.com
I understand that.
KmlLayer has obvious disadvantages, some of which i ecountered with uri length problem.
And FusionTablesLayer, well it says in developer guide that it is experimental stuff - so good for playing and testing, but not for production, i would say.

On Tuesday, March 6, 2012 11:12:10 PM UTC+1, geoco...@gmail.com wrote

Brandon Donnelson

unread,
Mar 13, 2012, 12:13:42 PM3/13/12
to google-map...@googlegroups.com
Can you contact me on G+. I've been slammed lately. 

Have a good day,
Brandon Donnelson


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/RP3nMvzZyMgJ.

To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.

egremyl

unread,
Mar 15, 2012, 4:50:18 PM3/15/12
to google-map...@googlegroups.com
ok, i just did :-)


On Tuesday, March 13, 2012 5:13:42 PM UTC+1, Brandon Donnelson wrote:
Can you contact me on G+. I've been slammed lately. 

Have a good day,
Brandon Donnelson


On Tue, Mar 13, 2012 at 12:26 AM, egremyl <emil.eg...@gmail.com> wrote:
I understand that.
KmlLayer has obvious disadvantages, some of which i ecountered with uri length problem.
And FusionTablesLayer, well it says in developer guide that it is experimental stuff - so good for playing and testing, but not for production, i would say.

On Tuesday, March 6, 2012 11:12:10 PM UTC+1, geoco...@gmail.com wrote

That is all a matter of the processing power and browser you are
using.  Client-side parsing works OK for powerful modern machines
running modern browsers.

Server-side tile generation (KmlLayer/FusionTablesLayer) will be
better for large data sets on older computers/browsers or mobile
browsers.

  Larry

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/RP3nMvzZyMgJ.

To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages