[GIS] Overlaying ArcGIS REST API on Google Maps

arcgis-rest-apigoogle maps

For example I have ArcGIS REST API as
us high way state city county

https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer

I want to see it on Google Maps.

How do I do it?

Best Answer

You can find 3700+ arcgis server rest api overlay on google at

https://transparentgov.net/cleargov1/931/arcgis-server-3700-from-mappingsupport-com

Share my working code: working sample on jsfiddle

the key is:

  1. On google map, use overlay custom image. The overlay image size is the map div container width and height. The overlay image bound is google map, getBound, lat, lng etc... see code for details.

    Note: Overlay tiled coordinate map on google map will NOT works.
    failed sample overlay coordinated tiles from arcgis rest api export map

2 reason, first is arcgis rest api export image, does not seemlessly tiled. So you will see distorted, stretched tiled image, mismatch, not workable.

Second reason, arcgis rest api export image, are NOT tiled, the labeling will duplicate in one tile and the tile next to it. For example, if New York State cross 3 tiles, you will see 3 times New York label in each of 3 tiles. duplicated label is not workable.

So if you want to overlay coordinate tiled image on google maps, you must use arcgis rest api with tiled service, regular export map will NOT work.

  1. On arcgis rest api, use xxxx/mapserver/export?bbox=.....(details see my code)

working sample on jsfiddle

Related Question