> On Jun 28, 1:45 pm, mark mcclure <[email protected]> wrote:> It should be no
> surprise that the first loads faster, since it much
> > smaller.
>
> the first loads the encoded coastline in a separate 200KB javascript,
> and the second has the data within the 2 megabyte html file. If gzip
> compression was enabled on the web server, then the download for the
> second would be near to 300KB instead of 2 megabytes, and the two
> pages would load in similar times.
Space could be saved with something like:
var p=
{
x:[lng0,lng1, ... ]
,
y:[lat0.lat1, ... ]
}
;
var path=[];
for (var i=0;(p.x[i]!=null)*(p.y[i]!=null);i++)
{
path[i]=new google.maps.LatLng(p.y[i],p.x[i]);
}
Of course, Google could support such a structure directly for a huge
reduction in overhead. I submitted a suggestion to the issue
tracker. It was rejected.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.