Download the PHP package cedarmaps/cedarmaps-php-sdk without Composer

On this page you can find all versions of the php package cedarmaps/cedarmaps-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cedarmaps-php-sdk

cedar-maps

A mapping service and highly detailed and spatially accurate GIS vector data application that covers the whole country of Iran.

Install

Getting Started

Getting Access Token

You should have a client_id and client_secret in order to get an access_token.

API

getForwardGeocoding(query, index, filters)

input

query: string, URL-encoded text [REQUIRED]

index: Pick from CedarMaps::Constants['INDEXES'] for example CedarMaps::Constants['INDEXES']['STREET_INDEX']

filters:

Param Type Description
limit integer Max is 30
distance float Unit is km, 0.1 means 100 meters
location Array: ['lat' => ,'lon' => SOME_LONGITUDE] Center point of a nearby search. should be accompanied with distance param
type Array Pick from CedarMaps::Constants['FORWARD_GEOCODE']['TYPE']
ne Array: ['lat' => ,'lon' => SOME_LONGITUDE] Specifies north east of the bounding box - should be accompanied with sw param
sw Array: ['lat' => ,'lon' => SOME_LONGITUDE] Specifies south west of the bounding box - should be accompanied with ne param
Sample Response:

getReverseGeocoding(lat, lon, index)

It gives you an address based on a provided LatLng pair.

input

lat: number, Latitude [REQUIRED]

long: number, Longitude [REQUIRED]

index: Pick from CedarMaps::Constants['INDEXES'] for example CedarMaps::Constants['INDEXES']['STREET_INDEX']

Sample Response:

getDistance(points)

This method calculates the distance between points in meters. It can be called with up to 100 different points in a single request.

input

points: array, Array of point Arrays ['lat' => <SOME_LATITUDE>,'lon' => SOME_LONGITUDE] [REQUIRED]

Response Elements:
Param Description
distance The overall distance of the route, in meter
time The overall time of the route, in ms
bbox The bounding box of the route, format: minLon, minLat, maxLon, maxLat
Sample Response:

getDirection(points, options)

This method calculates the optimal driving routes between two or more points.

input

points: Array, Array: ['lat' => <SOME_LATITUDE>,'lon' => SOME_LONGITUDE] [REQUIRED]

options: Array of options like ['instructions' => true] Currently the only option is instructions that is boolean

Example

Response Elements:
Param Description
distance The overall distance of the route, in meter
time The overall time of the route, in ms
bbox The bounding box of the route, format: minLon, minLat, maxLon, maxLat
geometry The geometry of the route as a GeoJSON LineString
Sample Response:
Turn-by-turn Navigation

In order to get turn-by-turn instructions you should include {instructions:true} as option.

Response elements when instructions option provided:

Param Description
instructions Instructions for this route. The last instruction is always the Finish instruction and takes 0ms and 0meter
instructions[].text A description what the user has to do in order to follow the route
instructions[].street_name The name of the street to turn onto in order to follow the route
instructions[].distance The distance for this instruction, in meter
instructions[].time The duration for this instruction, in ms
instructions[].interval An array containing the first and the last index (relative to geometry.coordinates) of the points for this instruction. This is useful to know for which part of the route the instructions are valid
instructions[].sign A number which specifies the sign to show
  • Keep Left=-7
  • Turn Sharp Left = -3
  • Turn Left = -2
  • Turn Slight Left = -1
  • Continue = 0
  • Turn Slight Right = 1
  • Turn Right = 2
  • Turn Sharp Right = 3
  • Reached via = 5
  • Roundabout = 6
  • Finish = 4

Sample Response when instructions option provided:

getTileJson(mapId)

TileJSON is a format that manages the complexities of custom maps. It organizes zoom levels, center points, legend contents, and more, into a format that makes it easy to display a map.

input

mapId: string, Cedar map ID [REQUIRED]

Sample Response:

Constants

License

MIT © Cedar Maps


All versions of cedarmaps-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
monolog/monolog Version 1.*
guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cedarmaps/cedarmaps-php-sdk contains the following files

Loading the files please wait ....