Get_polygon

Description

Gets a collection of locations that represents a polygon on a map. It can be overlayed in a map.

URL

/VERSION/resources/get_polygon.FORMAT

Available Format

KML,JSON

HTTP Method

GET

Accepted Version

1

Requires

Authorization.

Headers

Parameters

  • access_token: (Required) access_token to user resources.
  • shape:(Required) polygon shape (value supported “circle”).
  • resolution:(Required) vertices for a circle.
  • lat:(Required)  latitude of the center of the circle.
  • lng:(Required) length of the circle center.
  • radius:(Required) radius in meters.

Example

https://api.topoos.com/1/resources/get_polygon.json?access_token=62f5280d-c954-4ee7-a0a8-68ff9c2810d8&lat=40.953107&lng=-4.123233&radius=10.0&resolution=10&shape=circle

Reply
JSON example reply

[{
    "latitude": 40.953107,
    "longitude": -4.1231138425897
}, {
    "latitude": 40.9531598966697,
    "longitude": -4.12313659963006
}, {
    "latitude": 40.9531925886095,
    "longitude": -4.12319617833521
}, {
    "latitude": 40.9531925886095,
    "longitude": -4.12326982166479
}, {
    "latitude": 40.9531598966697,
    "longitude": -4.12332940036994
}, {
    "latitude": 40.953107,
    "longitude": -4.1233521574103
}, {
    "latitude": 40.9530541033303,
    "longitude": -4.12332940036994
}, {
    "latitude": 40.9530214113905,
    "longitude": -4.12326982166479
}, {
    "latitude": 40.9530214113905,
    "longitude": -4.12319617833521
}, {
    "latitude": 40.9530541033303,
    "longitude": -4.12313659963006
}, {
    "latitude": 40.953107,
    "longitude": -4.1231138425897
}]