Announcement

Collapse
No announcement yet.

KML Viewer Sample App accessing ARCGIS KML/KMZ layers

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • KML Viewer Sample App accessing ARCGIS KML/KMZ layers

    Hi,
    Has anyone had any luck getting the KML Viewer sample app to load the KMZ links, or files, from any of the map samples at: http://services.arcgisonline.com/arcgis/rest/services? The sample app seems to load the first level or two, but then quits trying. The levels that do load seem to have problems with the projection as well. They open up just great in GE.
    Thanks,
    James

  • #2
    For instance, the layer called USA_Topo_Maps (MapServer) at http://services.arcgisonline.com/arc...Maps/MapServer has a link at the top of the page labeled "Google Earth" that is a kmz link: http://services.arcgisonline.com/arc...l/mapImage.kmz. Whether I save the KMZ flle, or just use the link in the sample KML Viewer app, it only showes two of the 15 available layeres. If you open up the KMZ, here's the KML code:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.opengis.net/kml/2.2">
    <Document>
    <name>USA_Topo_Maps</name>
    <LookAt>
    <longitude>0.0</longitude>
    <latitude>-1.4210854715202004E-14</latitude>
    <altitude>0</altitude>
    <range>4.007501158306904E7</range>
    <tilt>0</tilt>
    <heading>0</heading>
    </LookAt> <Region>
    <Lod>
    <minLodPixels>256</minLodPixels>
    <maxLodPixels>768</maxLodPixels>
    <minFadeExtent>-1</minFadeExtent>
    <maxFadeExtent>-1</maxFadeExtent>
    </Lod>
    <LatLonAltBox>
    <north>84.99999999999999</north>
    <south>-85.00000000000001</south>
    <east>179.99998854084407</east>
    <west>-179.99998854084407</west>
    </LatLonAltBox>
    </Region>
    <NetworkLink>
    <name>0-0-0</name>
    <open>1</open>
    <description>0-0-0</description>
    <Region>
    <LatLonAltBox>
    <north>85.05112877980484</north>
    <south>-85.05112877980022</south>
    <east>179.99998854084407</east>
    <west>-179.99998854084407</west>
    </LatLonAltBox>
    <Lod>
    <minLodPixels>256</minLodPixels>
    <maxLodPixels>768</maxLodPixels>
    <minFadeExtent>-1</minFadeExtent>
    <maxFadeExtent>-1</maxFadeExtent>
    </Lod>
    </Region>
    <Link>
    <href>http://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/kml/regions/0-0-0.kmz?</href>
    <viewRefreshMode>onRegion</viewRefreshMode>
    <viewFormat/>
    </Link>
    </NetworkLink>
    </Document>
    </kml>

    Comment


    • #3
      That page indicates that the set is using Spatial Reference: 102100 (3857), which according to my mapserver epsg file is:
      # WGS 84 / Pseudo-Mercator
      <3857> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <>

      I don't see this projection listed in the KML, so I guess the client is just expected to know this? Could this be the problem with loading this KMZ?

      Comment

      Working...
      X