Composant Delphi / Google Maps / OpenStreetMap / Leaflet  / Mappilary / Native Maps 100% Delphi 0% WebBrowser 0% Javascript


you are here :Autres composants

TECVelib is a class that gives you access to the api of Self-service bicycles JCDecaux (Vélib)

Fig. 155 DemoVelib


function getContracts : integer;

Retrieves all the contracts, they are stored in the array Contracts
Returns the number of contracts, accessible also through the property ContractsCount

function getAllStations:integer;

Retrieves all the stations of all contracts, accessible in the table Stations
Returns the number of stations

function getContractStations(const Contract:string):integer;

Retrieves all of the stations for a contract, available in the table Stations
Returns the number of stations

function InfoStation(const Contract: string; const Station: TECVelibStation): boolean;

Gets the station a contract-related information

property ApiKey: string;

An api key is required, it is free just register on the site
TECVelib has its own key but it is preferable that each uses its own.

property Stations : TECVelibStations;

List of stations (see getAllStations et getContractStations)

property Contracts[index:integer] : TECVelibContractInfo;

List of contracts (see getContracts)

property ContractsCount:integer;

Number of contracts

Example of use

// Delphi map component ECMap

// use TECVElib

FECVelib := TECVelib.Create;

// get stations in Paris

// set stations on map
var i : integer;
id :integer;
Station : TECVelibStation;
Poi : TECMapPoi;

for i:=0 to FVelib.Stations.count-1 do

Station := FECVelib.Stations[i];

id := map.Pois.add(Station.latitude,Station.Longitude);

Poi := map.Pois[id];

Poi.caption := Station.Name;


go to page
© 2016 ESCOT-SEP Christophe - Made width Help&Web - RSS - Google+