BeMapAPI
BeMap 4.1.0
API reference: POST /nearpoi/1.0

REST API, Service version 1.0.0

Near POI#

Find POI around a coordinate, limited by distance of travel from coordinate to POI.

Illustration of near POI service

Summary#

  1. Request
    1. Parameters
  2. Response
    1. Details of fields
    2. Response samples

Request#

The request must be sent with the HTTP method POST and the HTTP header Content-Type set to application/json.

Sample: URI: /bgis/service/nearpoi/1.0

POST data:

javascript
{
 "coordinate": {
  "longitude": 2.40552,
  "latitude": 48.85342
 },
 "distance": 70,
 "transportType": "PEDESTRIAN",
 "orderBy": "DISTANCE_ASC"
}

Parameters#

  • coordinateCoordinateSatrequired

    Coordinate of center of research, will be used with distance parameter.

    CoordinateSat fields
    • lonnumber (double)required

      Longitude in degrees decimal (WGS84).

      Also accepted as longitude.

    • latnumber (double)required

      Latitude in degrees decimal (WGS84).

      Also accepted as latitude.

    • headingnumber (double)

      Heading in degrees.

    • speednumber (float)

      Speed in km/h.

    • timeinteger (int64)

      GPS time in milliseconds (EPOCH).

    • satinteger (int32)

      Number of GPS satellites available.

  • distanceinteger (int64)required

    Limit of research in meters.

  • geoserverstring

    Geoserver name.

  • swidxinteger (int32)deprecated

    Switch index.

  • transportTypeenum

    Define the transportation mode: Car, pedestrian, truck, etc. By default PEDESTRIAN.

    9 accepted values
    PEDESTRIANPedestrian.
    BICYCLEBicycle.
    MOTORCYCLEMotorcycle.
    CARPassenger car.
    TAXITaxi.
    PUBLIC_BUSPublic bus.
    EMERGENCYEmergency vehicle.
    DELIVERY_TRUCKDelivery truck. Deprecated, use TRUCK instead.
    TRUCKTruck.
  • orderByenum

    Sort the result by distance or duration in either ascending or descending. Disable by default.

    4 accepted values
    DISTANCE_ASCSort by distance in either ascending.
    DISTANCE_DESCSort by distance in either descending.
    DURATION_ASCSort by duration in either ascending.
    DURATION_DESCSort by duration in either descending.
  • plboolean

    Enable the output polyline geometry of route. Set to true to enable otherwise false. Disable by default.

  • eplboolean

    Enable the output encoded polyline geometry of route with Google Algorithm. Set to true to enable otherwise false. Disable by default.

  • serviceCategoriesstring[]

    Service categories. POI Class ID (numeric value defining the type of service, see the Class ID list in Glossary menu).

Response#

Return the list of POI around the input coordinate.

Details of fields#

  • poisNearPoint[]

    Points of interests.

    NearPoint fields
    • coordinateCoordinate

      Geographical coordinate of POI.

      Coordinate fields
      • lonnumber (double)required

        Longitude in degrees decimal (WGS84).

        Also accepted as longitude.

      • latnumber (double)required

        Latitude in degrees decimal (WGS84).

        Also accepted as latitude.

    • distanceinteger (int64)

      Distance of travel in meters between the input coordinate and POI.

    • durationinteger (int64)

      Duration of travel in seconds between the input coordinate and POI.

    • typestring

      Type of POI.

    • namestring

      Name of POI.

    • telephonestring

      Phone number of POI.

    • commentstring

      Comment.

    • polylineCoordinateFullName[]

      Polyline geometry of route between start coordinate and the POI.

      CoordinateFullName fields
      • longitudenumber (double)required

        Longitude in degrees decimal (WGS84) (double).

      • latitudenumber (double)required

        Latitude in degrees decimal (WGS84) (double).

      • altitudenumber (double)

        Altitude in meters.

    • encodedPolylinestring

      Polyline geometry of route between start coordinate and the POI. It is a composed of coordinates list and encoded with Google Algorithm.

Response samples#

JSON Sample:

javascript
{
	"pois": [{
			"coordinate": {
				"longitude": 2.40595,
				"latitude": 48.85328
			},
			"distance": 54,
			"duration": 61,
			"type": "SHOP",
			"name": "JEAN CARIL",
			"telephone": "+(33)-1-43675352"
		}, {
			"coordinate": {
				"longitude": 2.40577,
				"latitude": 48.85382
			},
			"distance": 64,
			"duration": 67,
			"type": "RESTAURANT",
			"name": "JARDIN D'OR",
			"telephone": "+(33)-1-44649320"
		}, {
			"coordinate": {
				"longitude": 2.40598,
				"latitude": 48.85316
			},
			"distance": 68,
			"duration": 66,
			"type": "RESTAURANT",
			"name": "MAXILIFE",
			"telephone": "+(33)-1-43792928"
		}, {
			"coordinate": {
				"longitude": 2.40575,
				"latitude": 48.85386
			},
			"distance": 68,
			"duration": 71,
			"type": "RESTAURANT",
			"name": "LE MONTANA",
			"telephone": "+(33)-1-43483873"
		}
	]
}