Skip to content

CanterburyRegionalCouncil/ESRI_Enhanced_Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESRI Enhanced Proxy

ESRI Enhanced Web Map Proxy, proxy that helps with improving the web printing.

The proxy allows for the changing out tile map services to dynamic map services so that the user can increase the resolution that the map is produced higher than what the tile services have been created for.

It can also allow if coded at the client end, extra scales that are not possible under the tile services.

For Substituting tile services for dynamis ones .... use these xml tags

i.e.

tile service url="http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Imagery/MapServer"

dynamic one to change out to alternate="http://arcgis.ecan.govt.nz/arcgis/rest/services/Dynamic/Imagery_Latest/MapServer"

``

	<!-- Imagery Service-->
<substituteUrl url="http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Imagery/MapServer"
        alternate="http://arcgis.ecan.govt.nz/arcgis/rest/services/Dynamic/Imagery_Latest/MapServer"></substituteUrl>
``

For sending maps to esri printing service with scales other than tile scales you need to inject a few more variables.

i.e. tiledLayers

tiledLayers:[{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/No_Background/MapServer","id":"Basic","title":"Basic"},{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Region_Base/MapServer","id":"Regional Base","title":"Regional Base"},{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Region_Base_Labels/MapServer","id":"Regional Base Labels","title":"Regional Base Labels"}]

Below is as per normal POST to Webmap printing service. (addtional parameter is above )

Layout_Template:A4 Landscape
Format:PDF
f:json
visibleLayers:["Basic","Regional Base","Regional Base Labels","Resource Consents","PredictiveSearchGraphicsLayer","IdentifyResultGraphicsLayer","RedLiningGraphicsLayer","MeasurementsGraphicsLayer","GraphicsLayer809"]
Web_Map_as_JSON:{"mapOptions":{"extent":{"xmax":1583312.9074591491,"ymin":5170187.936563373,"xmin":1573435.3357040049,"ymax":5175049.553911608,"spatialReference":{"wkid":2193}},"scale":19444.000000001513},"exportOptions":{"dpi":200},"operationalLayers":[{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Resource_Consents/MapServer","visibleLayers":[],"id":"Resource Consents","title":"Resource Consents"},{"featureCollection":{"layers":[{"featureSet":{"geometryType":"esriGeometryPolygon","features":[{"geometry":{"rings":[[[1576091.0317013972,5170769.947687895],[1576091.0317013972,5174467.542787085],[1580657.2114617568,5174467.542787085],[1580657.2114617568,5170769.947687895],[1576091.0317013972,5170769.947687895]]],"spatialReference":{"wkid":2193}}}]},"layerDefinition":{"geometryType":"esriGeometryPolygon","fields":[]}}]},"id":"GraphicsLayer809","title":"Printable Area"}],"layoutOptions":{"titleText":"asdasd","legendOptions":{"operationalLayers":[{"subLayerIds":[0],"id":"Aerial"},{"subLayerIds":[0],"id":"Basic"},{"subLayerIds":[0,1,2,3,4,5,6,7],"id":"Regional Base"},{"subLayerIds":[0,1,2,3,4,5,6],"id":"Regional Base Labels"}]},"authorText":"Environment Canterbury","copyrightText":"asdasdas"}}

in full below

tiledLayers:[{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/No_Background/MapServer","id":"Basic","title":"Basic"},{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Region_Base/MapServer","id":"Regional Base","title":"Regional Base"},{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Region_Base_Labels/MapServer","id":"Regional Base Labels","title":"Regional Base Labels"}]
Layout_Template:A4 Landscape
Format:PDF
f:json
visibleLayers:["Basic","Regional Base","Regional Base Labels","Resource Consents","PredictiveSearchGraphicsLayer","IdentifyResultGraphicsLayer","RedLiningGraphicsLayer","MeasurementsGraphicsLayer","GraphicsLayer809"]
Web_Map_as_JSON:{"mapOptions":{"extent":{"xmax":1583312.9074591491,"ymin":5170187.936563373,"xmin":1573435.3357040049,"ymax":5175049.553911608,"spatialReference":{"wkid":2193}},"scale":19444.000000001513},"exportOptions":{"dpi":200},"operationalLayers":[{"url":"http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Public/Resource_Consents/MapServer","visibleLayers":[],"id":"Resource Consents","title":"Resource Consents"},{"featureCollection":{"layers":[{"featureSet":{"geometryType":"esriGeometryPolygon","features":[{"geometry":{"rings":[[[1576091.0317013972,5170769.947687895],[1576091.0317013972,5174467.542787085],[1580657.2114617568,5174467.542787085],[1580657.2114617568,5170769.947687895],[1576091.0317013972,5170769.947687895]]],"spatialReference":{"wkid":2193}}}]},"layerDefinition":{"geometryType":"esriGeometryPolygon","fields":[]}}]},"id":"GraphicsLayer809","title":"Printable Area"}],"layoutOptions":{"titleText":"asdasd","legendOptions":{"operationalLayers":[{"subLayerIds":[0],"id":"Aerial"},{"subLayerIds":[0],"id":"Basic"},{"subLayerIds":[0,1,2,3,4,5,6,7],"id":"Regional Base"},{"subLayerIds":[0,1,2,3,4,5,6],"id":"Regional Base Labels"}]},"authorText":"Environment Canterbury","copyrightText":"asdasdas"}}

About

ESRI Enhanced Web Map Proxy, proxy that helps with improving the web printing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published