none
Geography Data (i.e. Polygon) is not getting uploaded RRS feed

  • Question

  • Hi,

    I am trying to upload geographical data/locations in terms of polygon on Bing map. Getting error of "unsupported data type in data schema" for Geographical data.

    Tried every data file types to upload but getting same error.

    1. XML :- Schema data type :- type "xs:anyType"

    2. CSV, Tab and Pie seperated Text :- schema data type :- Edm.Geography.

    Please help me in figuring out if i am doing anything wrong.  How can i upload the geographical data/polygons?

    Appreciate the help!!

    Thanks,

    Amit Kumar

     
    Tuesday, December 9, 2014 7:07 PM

Answers

  • Are you doing this through the Bing Maps portal or by using the REST API's for the Bing Spatial Data Services? Currently the spatial data is only supported through the REST API's and not the portal itself as it is a fairly new feature and the portal has not yet been updated.

    http://rbrundritt.wordpress.com

    Tuesday, December 9, 2014 7:10 PM

All replies

  • Are you doing this through the Bing Maps portal or by using the REST API's for the Bing Spatial Data Services? Currently the spatial data is only supported through the REST API's and not the portal itself as it is a fairly new feature and the portal has not yet been updated.

    http://rbrundritt.wordpress.com

    Tuesday, December 9, 2014 7:10 PM
  • Thanks a lot Ricky for prompt response. Apperciate your help.

    Earlier i was trying to upload through bing maps portal itself.

    After your suggestion i used Rest API's query to create a data source but now getting the "Unauthorized" error :(

     I double checked my key value. Not sure why i am getting this error.

    My Query:-
    http://spatial.virtualearth.net/REST/v1/Dataflows/LoadDataSource?dataSourceName=GeoData9Dec&loadOperation=complete&setPublic=1&input=xml&output=xml&key="my master key"

    Input data :- XML Sample of FourthCoffeeShops provided in API documentation.

    Method- Post; Input format:- application/xml

    Error response:

    <Fault xmlns="http://spatial.virtualearth.net/REST/v1/Dataflows/LoadDataSource">
       <authenticationResultCode>NoCredentials</authenticationResultCode>
       <brandLogoUri>http://spatial.virtualearth.net/Branding/logo_powered_by.png</brandLogoUri>
       <copyright>Copyright © 2014 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.</copyright>
       <errorDetails>
          <e>Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation.</e>
       </errorDetails>
       <resourceSets/>
       <statusCode>401</statusCode>
       <statusDescription>Unauthorized</statusDescription>
       <traceId>61cfa9073c0c4ddc92f552175eed1327|CH10063346|02.00.107.1900|</traceId>
    </Fault>.

    It would be really helpful to me if i get any pointer for this error. Thanks!!

    Amit Kumar


    Amit K

    Tuesday, December 9, 2014 8:01 PM
  • Ricky,

    Thanks!!

    After having some changes in input data sample i get success response from LoadDataSource query. The data source has been uploaded having spatial data in form of polygon. But the polygon is not being visible on Map.

    Is there need to do something extra to get visible on Map? Any help would be appericiated.

    Thanks 


    Amit K

    Tuesday, December 9, 2014 9:19 PM
  • As I mentioned before the Bing Maps portal has not yet been updated to support the Geography type, as such you won't see it on the map in their until the site is updated (something we are working on).

    As for showing the data on the map you will have to use the REST services to request the data into your application. You can then parse the Well Known Text and create the shape on the map. I

    If you are using JavaScript then take a look at these resources:

    http://www.bingmapsportal.com/ISDK/AjaxV7#SpatialDataServices1

    JavaScript module to parse Well Known Text into a Bing Maps Shape: http://bingmapsv7modules.codeplex.com/wikipage?title=Well%20Known%20Text%20Reader%2fWriter (to download go to the source code tab)

    Blog post on using the geography data in a JavaScript Windows Store App: http://blogs.bing.com/maps/2013/11/13/introducing-support-for-custom-geospatial-data-in-bing-sds/

    If working with .NET, I have created a pretty powerful library that works pretty much everywhere and supports parsing Well Known text and rendering it on a map. You can find it here: http://mapstoolbox.codeplex.com/

    Documentation for the Query API can be found here: http://msdn.microsoft.com/en-us/library/gg585126.aspx


    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Wednesday, December 10, 2014 8:53 AM
    Wednesday, December 10, 2014 8:53 AM