On Tuesday, December 21, 2010 6:18:54 AM UTC-6, Bill Lee wrote:
>
> I would like to use the KML that represents a map I have saved in MyMaps. 
> Currently I am able to do so, but the procedure is a bad, bad hack!
>
> In short: I download the KML and save it on my local machine. The 
> application then uses the list of KML files held locally as the "list of 
> available MyMap" files. I then have to copy the KML from my local machine to 
> an external website since the API says  "hosted on a publicly accessible web 
> server".
>
>
> I would like a way to
> 1) Get a list of available "MyMaps" maps from Google, and then
> 2) Use the KML directly from the Google servers instead of my round-about 
> hack.
>
> As a less desireable alternative: once I have the KML on my local machine 
> in a file, I would like to create a KmlLayer using that local file instead 
> of the current KmlLayer requirement of a "file that is hosted on a publicly 
> accessible web server".
>
> Any ideas?
>
> Thanks.
>
> Bill Lee
>
> PS: Note: post #1! :-)
>

Larry and Joseph, thanks for the pertinent and  quite helpful responses. 
They illustrate that my "hack" is essentially the only way it will work. 
I.e.,

> You can link to the KML directly from the Google servers.  Look inside 
> the kml file you downloaded, it is usually a network link to the kml 
> from google's servers 

This is what my "hack" is doing: manually downloading the KML (via the 
"Link" by adding "output=kml"). Unfortunately the kml returned did NOT 
contain the network link. However, the kml retrieved by using the "View in 
Google Earth" most certainly DID contain the network link. Modifying my code 
to use the local copy of that kml, extracting the network link (with the 
"output=kml" already there) did, indeed work, using the actual MyMaps kml 
from the google server. My "hack" has been modified to get the kml in that 
manner. The need to place the kml on a "publicly accessible web  server" (my 
own web site in my case) has been eliminated. That's GREAT and a BIG 
improvement.

However, it's STILL a hack!

The obvious solution is an API that will recover the list of available 
MyMaps, and then the appropriate network link. That API would probably 
require some sort of input parameter so that MyMaps would know WHO'S MyMaps 
are being requested. That seems to be a reasonable requirement. I am very 
surprised that this API is not already there given the wonderful capability 
of the Google map environment.

> (but as you haven't followed the posting 
> guidelines and posted a link to your map, I can't say for sure...) 

I read the posting suggestions, as any newcomer should. I did NOT include a 
link since there is no map that illustrates the problem. This was based on 
the presumption (perhaps erroneously) that the situation could be evidence 
by ANY map held by MyMaps in Google.

In any case, your response has been very helpful and I certainly appreciate 
the effort to make it.

Regards,

Bill Lee


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