none
arcGIS KML Service Not properly defining polygon objects in BING maps RRS feed

  • Question

  • Hello,

    I need to find some way to create polygons from an ESRI/arcGIS Shapefile. I've tried multiple methods, but the KML seems to be the way to go. However, I'm still having issues.

     

    On arcServer, I've added the layers and saved the map.(using arcMap.) I then published the service, as a web service, and have enabled KML.

     

    Now, in Google Earth the layers show up correctly. However, in BING, the only time any object/polygon gets loaded is when i create a 'Bookmark' in arcMap. The bookmarks seem to be rather useless, considering I cannot bookmark an entire layer.

     

    This is the URL for my KML: http://107.22.41.0/ArcGIS/services/NPF_new_coordSystem/MapServer/KmlServer

     

    And this is my bing maps 6.3 AJAX code:

     

    ***BEGIN CODE****


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
       <head>
          <title></title>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
          <script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
    
          <script type="text/javascript">
             var map   = null;
             
             function GetMap()
             {
                map = new VEMap('myMap');
                map.LoadMap(new VELatLong(46.3081, -122.1928), 12);
             }
    
             function AddMyLayer(type)
             {
                var l = new VEShapeLayer();
                var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, "http://107.22.41.0/ArcGIS/services/NPF_new_coordSystem/MapServer/KmlServer", l);
    alert('start');
                map.ImportShapeLayerData(veLayerSpec, onFeedLoad);
    alert('start2');
             }
    
             function onFeedLoad(feed)
             {
                alert('RSS or Collection loaded. There are ' + feed.GetShapeCount() + ' items in this list.');
             }
          </script>
       </head>
       <body onload="GetMap();">
          <div id='myMap' style="position:relative; width:600px; height:400px;"></div>
          <p>
             For this version, the GeoRSS feed needs to be on the same domain as this computer.
             Right-click
             <a href="http://www.microsoft.com/virtualearth/isdk/ajax/georsstest.xml">
                georsstest.xml</a>,
             save the file into the same folder as this Web page,
             such as <code>C:\Inetpub\wwwroot</code>,
             and then click the <b>Load RSS</b> button below.
          <p>
          <INPUT id="txtSource" type="text" value="georsstest.xml" name="txtSource">
          <INPUT id="loadFeed" type="button" value="Load RSS" onclick="AddMyLayer(VEDataType.GeoRSS);">
       </body>
    </html>
    

    ***END CODE****

     

    The only thing I really need to do, is draw the boundaries of every single entity that's in that layer, and then put that onto bing Maps. I've also tried tile layers, though  with the immense geographic coverage of my shapefile, i'd be generated roughly 6.9 billion images.(That's only using 14 out of the 18 zooms)

     

    Has anybody had this problem? Any and all help is greatly appreciated. When we scoped this project we didn't think it'd be near this difficult. Creating polygons is rather simple. If only you could extract LocationRect objects from the shapefile?(in my dreams)

    • Moved by Jayaram Choudhary Friday, January 27, 2012 7:12 PM Bing Maps Issue (From:Live Connect)
    • Moved by Ricky_Brundritt Saturday, March 10, 2012 1:34 PM (From:Bing Maps: Map Control and Web services Development)
    Friday, January 27, 2012 6:40 PM

Answers

  • Is your KML file publically available? Bing Maps V6.3 loads in your KMl file by parsing it on a server and then passing in the data it needs to render it on the map. If your kml file is not publically available then this won't work.

     

    That said a nice way to integrate ESRI shapefiles with Bing Maps is to inport it into a SQL 2008 or SQL Azure database using Shape2SQL then using the AJAX Map Data Connector to load the data on Bing Maps. The data connector lets you load the data as vector or raster (tiles) on the map. http://ajaxmapdataconnector.codeplex.com/


    http://rbrundritt.wordpress.com

    Sunday, January 29, 2012 3:17 AM

All replies

  • Is your KML file publically available? Bing Maps V6.3 loads in your KMl file by parsing it on a server and then passing in the data it needs to render it on the map. If your kml file is not publically available then this won't work.

     

    That said a nice way to integrate ESRI shapefiles with Bing Maps is to inport it into a SQL 2008 or SQL Azure database using Shape2SQL then using the AJAX Map Data Connector to load the data on Bing Maps. The data connector lets you load the data as vector or raster (tiles) on the map. http://ajaxmapdataconnector.codeplex.com/


    http://rbrundritt.wordpress.com

    Sunday, January 29, 2012 3:17 AM
  • Did you get ArcGIS KML service to work with Bing? Im trying to add a point service and I can't get it to work.
    Thursday, February 16, 2012 5:58 PM