On Nov 14, 11:12 am, Ron White <[email protected]> wrote:
> I have been working on this for weeks now.  I have live data that I want to
> display in an embedded Google Map.  I have a kml file that has a network
> link.  This kml file works perfectly in Google Earth.  It also works
> perfectly if I go to Google Maps and paste the link.  It does not work if
> embedded into my web page.  Originally, I was trying to use a kml file with
> multiple network links.  I wanted to show several layers and give the user
> the ability to turn on/off layers.  But I gave up on that and now I am just
> trying to display 1 network link.
>
> I have tried:
> 1. Using the iframe code created by the Google Maps web page and then
> changing the source to a variable.  This does actually work, but I can't
> get it to zoom to the area I want and I don't think it is possible to turn
> layers on/off.
>
> 2.  Creating a new google.maps.map and adding a kml file (this doesn't work
> at all):
>        var map = new google.maps.Map(document.getElementById("GMAP"),
> myOptions);
>        var kmlLayer = new
> google.maps.KmlLayer('http://wwww.usahas.com/ge/kml/RouteOnly/vr025.kml',
>        {  suppressInfoWindows: true, map: map});
>
> 3.  I also tried this (works, but won't zoom and doesn't work with API V3
> at all):
>         geoXMLArea = new
> GGeoXML("http://wwww.usahas.com/ge/kml/RouteOnly/vr025.kml";
>         map = new GMap2(document.getElementById('GMAP'));
>         map.setCenter(new GLatLng(40,-99), 3);
>         map.setMapType(G_HYBRID_MAP);
>
>         map.addControl(new GLargeMapControl());
>         map.addControl(new GScaleControl());
>         map.addControl(new GMapTypeControl());
>
>         map.addOverlay(geoXMLArea);

It works with geoxml3 in v3 (and with KmlLayer):

http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/Get_GE_VR025_kml.xml

If I save it to my local server.  Don't know why it doesn't work from
yours.

  -- Larry



>
> 4.  Finally, I tried a GEORSS feed.  This also works in Google Maps but not
> in my web page.
>          var georssLayer = new
> google.maps.KmlLayer('http://www.usahas.com/SpatialDisplay/GEORSSFeed.ashx?route=vr025&mont...
> hour=16');
>             georssLayer.setMap(map);
>
> Before this, I haven't done any work with Google Maps.  I usually do
> everything in Google Earth.  But in this case, I can't use Google Earth.  I
> am surprised at how much more difficult Google Maps is to work with.
>
> Thanks for any help, I sure need it.
> Ron

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