Class: Isochrone

cercaliagl.service/Isochrone


Javascript ES5

const isochroneService = new cercaliagl.service.Isochrone({ ... });

This class offers the service of calculating isochrones given an origin point, weight and value.<br/< It also allows to obtain a detailed or simpler geometry.

Example usage:

const isochroneService = new cercaliagl.service.Isochrone({
  position: new cercaliagl.LonLat(2.153665978, 41.395293973);
  weight: cercaliagl.service.Isochrone.Weight.DISTANCE,
  method: cercaliagl.service.Isochrone.Methods.DETAILED,
  isolevels: 20000
});

isochroneService.calculate((data) => {
  const wkt = data.cercalia.isochrones.isochrone.value;
  const feature = new cercaliagl.Feature({
    wkt: wkt
  });
  map.addFeature(feature);
  map.centerToFeatures([feature]);
});

new Isochrone(options)

Name Type Description
options

Isochrone request options

Name Type Description
countryId string

Country code filter

country string

Country name filter

regionId string

Region code filter

region string

Region name filter

subregionId string

Subregion code filter

subregion string

Subregion name filte

subOrRegion string

Region and Subregion name filter

municipality string

Municipality code filter

municipalityId string

Municipality name filter

cityId string

Town code filter

city string

Town name filter

position module:cercaliagl/LonLat~LonLat

Position

postalCode string

Postal code filter

address string

Street name filter with house number

streetId string

Street code filter

street string

Street name filter

housenumber number

House number filter

roadName string

Road name filter

roadId string

Road id filter

weight string

Proximity with real route distance. Possible values: time, distance, money.

inverse boolean

Can be true or false. With a false value, the distances are calculated from the reference to the target. With a true value, the distances are calculated from the references to the targets. The default is false.

method string

Calculation method. Por defecto: convexhull or concavehull. Default value convexhull.

isolevels number

Value, or incremental values list used for isochrone calculation (meters or miliseconds). Ex: 10000, 5000,10000,20000.

Extends

  • module:cercaliagl/service/Service~Service