david.shaeffer

Dynamic vector KML from AGS Server in Google Earth

Discussion created by david.shaeffer on Apr 20, 2012
Latest reply on May 7, 2012 by david.shaeffer
I have a KML file that points to my Map Service on our AGS Server.  I have it setup using <viewFormat> parameter in the main KML file to limit what is returned by the server the bounding box/view port of Google Earth(see code below).  I can get the Map Service to return a raster/overlay to the GE client for the bounding box/viewport but I cannot get the Map Service to return vector kml for the bounding box.  The server is trying to return the entire Map Service Feature Layer as a vectorized KML instead of just the features within the display extent.   

I have submitted a ticket to ESRI and it seems to be confusing to them.  I haven't been able to find anything on this topic anywhere.    You can check out a working example of this functionality that EPA maintains here (select the vector version):  http://www.epa.gov/waters/tools/WATERSKMZ/WATERSKMZ.html  I confirmed with EPA that this is out of the box functionality with AGS Server.  The only difference that I know of is that they are running AGS Server 9.3.1 and I am on 10.
 
This is the code in the main KML:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<NetworkLink>
<name>Streams</name>
<visibility>0</visibility>
<Style>
  <ListStyle id="Streams_FETCH">
   <listItemType>check</listItemType>
   <ItemIcon>
    <state>error</state>
    <href>files/StreamsError_1_3.png</href>
   </ItemIcon>
   <ItemIcon>
    <state>fetching2</state>
    <href>files/Streams3_1_3.png</href>
   </ItemIcon>
   <ItemIcon>
    <state>open</state>
    <href>files/Streams0_1_3.png</href>
   </ItemIcon>
   <ItemIcon>
    <state>closed</state>
    <href>files/Streams0_1_3.png</href>
   </ItemIcon>
   <bgColor>ffffffff</bgColor>
   <maxSnippetLines>2</maxSnippetLines>
  </ListStyle>
</Style>
<Url>
  <href>http://NWS-AS01GIS/TestArc/services/ODRG/Test_Service/MapServer/KmlServer?</href>
  <viewRefreshMode>onStop</viewRefreshMode>
  <viewRefreshTime>2</viewRefreshTime>
  <viewFormat>LayerIDs=1&amp;transparent=true&amp;bbox=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]&amp;size=[horizPixels],[vertPixels]&amp;</viewFormat>
</Url>
</NetworkLink>
</kml>

This is my goal:
[ATTACH=CONFIG]13713[/ATTACH]

Attachments

Outcomes