RxBing.whatsAroundMe()

Bing Spatial Data Service: collects all entities around a specified geo location

This calls bing spatial data service as an observable, and uses Rx to subscribe to the response of nearby entities

Usage

Hover over inputs/exits for more info.

var RxBing = require('machinepack-rxbing');


// Bing Spatial Data Service: collects all entities around a specified geo location

RxBing.whatsAroundMe({

apiKey: '232edfdnfddf4450',

location: '34.23245532,-40.47464. {latitude},{longitude}',

radius: '1',

select: 'Latitude,Longitude,IsWiFiHotSpot,DisplayName',

datasourceName: 'NAVTEQNA',

poiName: 'NavteqPOIs',

filter: 'StartsWith(PrimaryCity, Clear) eq true',

orberByClause: 'IsWheelchairAccessible',

top: '3',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

apiKey required

Your api access key to access bing spatial data services. This can be obtained at https://msdn.microsoft.com/en-us/library/ff428642.aspx

'232edfdnfddf4450'
location required

The users latitude and longitude

'34.23245532,-40.47464. {latitude},{longitude}'
radius required

Spatial data filter radius(in kilometers)

'1'
select

The selection fields from the bing spatial data source

'Latitude,Longitude,IsWiFiHotSpot,DisplayName'
datasourceName

The Bing spatial data public data source name to query

'NAVTEQNA'
poiName

The point of interest name

'NavteqPOIs'
filter

The Odata filter for the bing spatial data query

'StartsWith(PrimaryCity, Clear) eq true'
orberByClause

The Odata filter for the bing spatial data query

'IsWheelchairAccessible'
top

Sets the max returned alllwable results

'3'

Exits

error

An unexpected error occurred.

success

OK.