Class: OverpassAPI

OverpassAPI

Create osmOverpassAPI service instance

new OverpassAPI($http, $q, options)

Parameters:
Name Type Description
$http Object angular $http service
$q Object angular $q service
options Object
Source:

Methods


getAreaId(type, osmId)

http://wiki.openstreetmap.org/wiki/FR:Overpass_API/Overpass_QL#By_area_.28area.29 By convention the area id can be calculated from an existing OSM way by adding 2400000000 to its OSM id, or in case of a relation by adding 3600000000 respectively. Note that area creation is subject to some extraction rules, i.e. not all ways/relations have an area counterpart (notably those that are tagged with area=no, and most multipolygons and that don't have a defined name=* will not be part of areas).
Parameters:
Name Type Description
type String 'r'/'relation' or 'w'/'way'
osmId String/Number the id of the element
Source:
Returns:
the area id
Type
Number

overpass(query)

Parameters:
Name Type Description
query Object/String http://wiki.openstreetmap.org/wiki/FR:Overpass_API
Source:
Returns:
$http.get
Type
Promise