Adding an ArcGIS Server service to a Bing Maps web application

360
8
05-06-2014 10:48 AM
ducksunlimited
New Contributor
Dear All, How can I add a web service hosted on an ArcGIS Server to a web application built with MS Bing Maps? Appreciate any replies.

Thanks,
Russel
0 Kudos
8 Replies
JeffPace
MVP Regular Contributor
Sorry, you will have to consult the Bing forums for that
0 Kudos
ducksunlimited
New Contributor
I found this from the ESRI web page. Hopefully still works.

http://help.arcgis.com/en/webapi/javascript/bing/help/binghelp/intro_add_service.htm



Dear All, How can I add a web service hosted on an ArcGIS Server to a web application built with MS Bing Maps? Appreciate any replies.

Thanks,
Russel
0 Kudos
JeffPace
MVP Regular Contributor
0 Kudos
ducksunlimited
New Contributor
Thanks for your reply, Jeff.

see we are not going to create a new app with mashing up arcgis server services with bing map. we are trying to add an arcgis server service (all our spatial data) to our existing mapping app built with bing maps. surely we don't want to rebuild the app using esri JS API. any other solutions for adding an arcgis server service to a bing map app?

that API has been retired for several years

http://forums.arcgis.com/threads/108033-What-is-the-current-(10.2.1)-solution-to-mashup-a-web-servic...
0 Kudos
JeffPace
MVP Regular Contributor
Rewriting the application in the JS API is exactly what you will have to do, in my opinion.

I do not believe there is any support going forward for consuming AGS in Bing.
0 Kudos
ducksunlimited
New Contributor
Thanks again Jeff for your reply.

I haven't tested it yet, but it seems like Bing Maps supports either KML or WMS service so I can publish my map as a AGS map service with KML and WMS enabled to be consumed in Bing Maps. Is this doable?


Rewriting the application in the JS API is exactly what you will have to do, in my opinion.

I do not believe there is any support going forward for consuming AGS in Bing.
0 Kudos
LayneRobinson
New Contributor

I know this is an old thread, but I came across it looking for this information and I have a solution.

Add the @arcgis/core library to your code.  Import the FeatureLayer, Query, and Point objects.  Then add the @terraformer/arcgis library to your code and import the arcgisToGeoJSON object.

This function will perform the query against the ArcGIS Feature Server and return the data as GeoJSON.

  public getParcels(latitudenumberlongitudenumberrangenumber = 10.0😞 Observable<any> {
    const center = new Point({ latitude: latitudelongitude: longitude });
    const parcelLayer = new FeatureLayer({
    });

    const parcelQuery = new Query({
      spatialRelationship: "intersects",
      geometry: center,
      distance: range,
      units: 'kilometers',
      outFields: ['objectid''owner_name''mail_addr''mail_city''mail_stat''mail_zip''county''fips'],
      returnGeometry: true
    });

    return from(parcelLayer.queryFeatures(parcelQuery)).pipe(map(f => arcgisToGeoJSON(f'objectid')));
  }
 
Next, import the GeoJson module for Bing Maps.  You can read the results that come from the above function and drop them on the map.
 
const data = getParcels(<latitude>, <longitude>);
const options = fillColor: new Microsoft.Maps.Color(0000), strokeColor: '#ff00ff'strokeThickness: 5 };
const geojson = Microsoft.Maps.GeoJson.read(dataoptions);
const arcGISLayer = new Microsoft.Maps.Layer();
arcGISLayer.add(geojson);
map.layers.insert(arcGISLayer);
 
 
Hopefully, this answer will help someone who stumbles across this post looking for more or less the same answer.
0 Kudos
JeffPace
MVP Regular Contributor
Sorry, no idea.  This forum is for the JS API.  You would have to check the Bing forums
0 Kudos