esri.arcgis.gmaps.DynamicMapServiceLayer is part of the esri extensions for google maps, I believe (but not completely sure) it can't run on google earth
Why don't you enable the kml capabilities on the mapservice you are using to publish your spatial data? In this way you could be able to display your data with a request to the kml url
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.