TECVelib is a class that gives you access to the api of Self-service bicycles JCDecaux (Vélib)
TECVelib
function getContracts : integer;
Returns the number of contracts, accessible also through the property ContractsCount
function getAllStations:integer;
Returns the number of stations
function getContractStations(const Contract:string):integer;
Returns the number of stations
function InfoStation(const Contract: string; const Station: TECVelibStation): boolean;
property ApiKey: string;
TECVelib has its own key but it is preferable that each uses its own.
property Stations : TECVelibStations;
property Contracts[index:integer] : TECVelibContractInfo;
property ContractsCount:integer;
Example of use
// Delphi
map component ECMap
// use TECVElib
FECVelib := TECVelib.Create;
// get stations in
Paris
FECVelib.getContractStation('Paris');
// set stations on map
...
var i : integer;
id :integer;
Station : TECVelibStation;
Poi : TECMapPoi;
for i:=0 to FVelib.Stations.count-1 do
begin
begin
Station := FECVelib.Stations[i];
id :=
map.Pois.add(Station.latitude,Station.Longitude);
Poi := map.Pois[id];
Poi.caption := Station.Name;
end;