EMS.Service.PrintMap

EMS.Service.PrintMap is used to generate a static, printable map

Summary
EMS.Service.PrintMapEMS.Service.PrintMap is used to generate a static, printable map
Constructor
EMS.Service.Details
Functions
find
createQueryFromMapCreate a static map query from Parameters: query - {Mixed} is either a {String} id of the item to find or an {Object} wrapping the id.

Constructor

EMS.Service.Details

Functions

find

Example

var params = {
    "layers":["STREET"],
    "width":400,
    "height":400,
    "centre":{"lon":144.95, "lat":-36.9},
    "zoom":10
};

var service = new EMS.Service.PrintMap();
service.create(params, function(response, status) {
    if (status == EMS.Status.OK) {
        // Success, do something constructive with the response
    } else if (status == EMS.Status.NOT_FOUND) {
        // Not found, possibly removed
        alert("Item was not found");
    } else {
        // Failure, some other error
        alert(response.message);
    }
});

Alternatively, you can create static map parameters from an EMS.Map by using

var params = service.createQueryFromMap(map)

Parameters

query{Mixed} is either a {String} id of the item to find or an {Object} wrapping the id.
callback{Function} is the callback function in the form function(result, status).

createQueryFromMap

createQueryFromMap: function(map)

Create a static map query from Parameters: query - {Mixed} is either a {String} id of the item to find or an {Object} wrapping the id.

EMS.Service.PrintMap is used to generate a static, printable map
createQueryFromMap: function(map)
Create a static map query from Parameters: query - {Mixed} is either a {String} id of the item to find or an {Object} wrapping the id.
Close