Home > Geopedia API > getPrintUrl


Requests a URL that is used to retrieve a static image/document containing the current widget's content.

Command JSON members:

  • command: getPrintUrl
  • type: "image/jpeg" | "application/pdf"
  • paperSize: "A3" | "A4", (used when PDF)
  • isLandscape: true/false, (used when PDF)
  • title: option title string (used when PDF)
  • centerX: x coordinate number of the map center,
  • centerY: y coordinate number of the map center,
  • zoomLevel: current scale level number,
  • baseTableId: ID of the current background raster layer,
  • imgWidth: map image raster width in pixels,
  • imgHeight: map image raster height in pixels,
  • includeThemeInfo: true/false, (used when PDF)
  • includeTableInfo: true/false, (used when PDF)
  • includeFeatureInfo: true/false, (used when PDF)
  • includeLegend: true/false, (used when PDF)
  • highlightFeatures: true/false

Response JSON members:

  • command: "getPrintUrl",
  • error: true/false,
  • errorMessage: <optional message string when error occured>,
  • printUrl: <URL string>


{"command":"getPrintUrl","type":"pdf","paperSize":"A4", "centerX":123.456,"centerY":987.654,"zoomLevel":12, 
"baseTableId":4,"imgWidth":640,"imgHeight":480, "includeThemeInfo":true,"title":"My special map"} 

Repsonse: {"command":"getPrintUrl","error":false,"printUrl":"http://server/print/p?a=1&b=2&c=3"}