This is a collection of samples showing how to do the same things with Google Maps JavaScript API and ArcGIS API for JavaScript
Feel free to request more samples using the issues of this repo.
If you want to configure this in your local machine please rename the config_sample.js to config.js and add your API keys.