I have been playing around with GMap and KML on my ASP.NET MVC3 website. I noticed the example used full URLs yet on my tests it didn't work until several tries. These were my findings with regards to the GMAP3 addKmlLayer URL option:
- You can't use a shortened URL relative to the root such as /Public_Files/KML/Sample.kml it won't render
- You can't use a full localhost URL, won't render either: http://localhost:8035/Public_Files/KML/Sample.kml
- It has to be a full LIVE URL somewhere on the net http://www.mysite.com/Public_FIles/KML/Sample.kml
Maybe that information could be placed on the example in hopes of saving somebody's times trying to figure it out :-) I am glad I got mine working.
By the way... I noticed that in the example when you enable a checkbox that displays a KML layer it causes the map to automatically zoom in/out to encompass the enabled area. Is there a way to disable that behaviour? If I have several items displayed I want the user to have a better overview of the "new" KML layer with respect to the others, if it automatically zooms in then you lose that overview and have to manually zoom out to get your bearings again.
have you investigated the preserveViewport option in maps API?