You can use the URL-Queue API-extension to combine multiple URL's within one data set and to upload them with only one call.
All requested maps will be rendered fully parallelized and returned within one ZIP-file. Due to parallelized map generation performance is significantly
increased compared to one by one map requests.
There are two requirements to use the URL-Queue mechanism:
1. A user name and a password is required. Login information can be requested from your partner or from locr directly.
To connect with the locr maps service, an authentication is required.
2. The used server has to be defined, e.g. : https://maps1.locr.com
File definition of the URL-Queue (XML-structure)
Use the following file structure for upload:
The XML file may not contain more than 10.000 requests ! Additional requests will be ignored!
For each map the correct URL needs to be supplied!
The individual map file name may be defined. If the map file name is not defined, a default HASH-value will be used!
Upload the XML file for the URL-Queue (init)
To start a new URL-Queue, the XML file needs to be uploaded first.
Send a POST-request with enctype "multipart/form-data" to the following URL:
To issue the rendering request for up to 10.000 maps, use the following parameters:
file= "filename.xml" oder "filename.zip"
A notification mail will be sent after the rendering process has been finished.
Define an alternative map URL, for the records, where a map can not be generated for any reason.
An XML file with status information will be uploaded to the defined FTP server once the rendering process has been finished.
Definition of user name and password for FTP login
Return values on successful data import
If the upload and data import was successful, an XML file will be returned containing the number of records and a batch Id, that will be further used.
Return values in case of an error
I case of an error, an XML will be supllied with the following structure:
Sample request: https://maps1.locr.com/api/url_queue.php?action=stat&id=1
Status request for a URL-Queue (status)
The previously defined Id is important, as it is required for further requests for this URL-Queue.
Use the following request to check the status:
If the generation process was successful, the following XML will be returned:
The attribute batch-status may have the following values:
The attribute request-status may have the following values:
Cancellation of a URL-Queue (cancel)
Delete a URL-Queue (delete)
Advice: A URL-Queue will be deleted from the server after 30 days automatically !
Download of all rendered maps in the URL-Queue (download_archive)
With the following request, a ZIP file of all generated maps can be downloaded.