Sunday, 17 January 2016

Looking for Alternatives to Google gmaps utility widget for ArcGIS JSAPI API


I have been using https://code.google.com/p/gmaps-utility-gis/ as a solution to displaying Google imagery as a base layer on a ESRI JSAPI map. With the advent of JSAPI 3.4 and full AMD support this solution is showing it's age.


Is this still the best/only* solution for showing Google imagery on a JSAPI map?


*ESRI indicates that the WebTiledLayer will show Google imagery but does not provide an example.



Answer



Google does not allow access to their tiles outside of their public APIs, from section 10.1.1 a of the Google Maps/Google Earth APIs Terms of Service:



No Access to Maps API(s) except through the Service. You must not access or use the Maps API(s) or any Content through any technology or means other than those provided in the Service, or through other explicitly authorized means Google may designate. For example, you must not access map tiles or imagery through interfaces or channels (including undocumented Google interfaces) other than the Maps API(s).




That is why the solution you linked to is necessary: it loads and uses the Google Maps API to load Google's map tiles (including imagery).


You can continue to use legacy modules (modules created with dojo.provide, dojo.require and dojo.declare) with the latest version of the JS API until we (Esri) move to Dojo 2.0 which will remove support for legacy modules. This is still several JS API releases away since Dojo 2.0 isn't out yet. Hopefully the author of that code will re-write it as an AMD module as I think it is still the best way to use Google tiles with the JS API.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...