Oh and one more thing: learn to use and love Google Page Speed (http://
code.google.com/speed/page-speed/).

Chad Killingsworth

On May 12, 9:25 am, Chad Killingsworth
<[email protected]> wrote:
> It really depends on what your goals are. My goal is to present the
> user with an interface as fast as possible and then progressively add
> functionality. With that in mind, here's some suggestions:
>
> 1) Dynamically add the maps API on the DOMContentLoaded event. In this
> way, your basic HTML elements will show up first. You'll need to add a
> callback parameter to the maps api script source in order to call your
> initialization function.
>
> 2) In your initialize function, initialize the map only. Don't add any
> layers. Attach an event callback to the "tiles_loaded" event of the
> map to further customize it (use the addListenerOnce method).
>
> 3) In your tiles_loaded callback, add your custom layers. Also move
> your geolocation code here as well. Currently, the map isn't loading
> until the location data comes back - and that's SLOW.
>
> 4) Implement the offline storage mentioned 
> here:http://googlecode.blogspot.com/2010/04/google-apis-html5-new-era-of-m...
> - it makes a big difference for return visitors. There are a couple of
> gotcha's with this though. Realize that EVERY resource/url you access
> must be specified in the manifest file in some way.
>
> One more suggestion not related to speed; use this technique to set
> the map size:http://www.alistapart.com/articles/conflictingabsolutepositions/
> In this way your map will always be 100% of the screen size (even on
> rotation) and still leave room for your header and footer.
>
> You can see an example of all of these techniques 
> athttp://search.missouristate.edu/map/mobile/
>
> Chad Killingsworth
>
> On May 12, 8:48 am, Jack Berberette <[email protected]> wrote:
>
>
>
>
>
> > Hello Everyone,
>
> > Is it possible to pre-load or somehow speed up the layers being called into
> > the map?  With the AWESOME peoepl from this group, I have my map up and
> > running and am now bringing it in to an iPhone app.  It loads in the iPhone
> > but very slowly.
>
> > I have used Closure Compiler 
> > here:http://www.gamecarver.com/compressed.htmlandthatseemed to help a
> > little
>
> > Here's the main map file:http://www.gamecarver.com/viperapp.html
>
> > Thanks,
>
> > Jack
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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.

Reply via email to