Hi,
Is it possible to add GoogleMapLayer as a basemap in ArcGIS JS 4.x 2D? if yes how to achieve the same.the below code is in 3.x. Any help would be greatly appreciated.
googleLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">agsjs1<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>GoogleMapsLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'google'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="comment token">// optional. esri layer id.</SPAN>
apiOptions<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// load google API should be loaded.</SPAN>
v<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'3.6'</SPAN> <SPAN class="comment token">// API version. use a specific version is recommended for production system.</SPAN>
<SPAN class="comment token">// client: gme-myclientID // for enterprise accounts;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
mapOptions<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// options passed to google.maps.Map contrustor</SPAN>
streetViewControl<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN> <SPAN class="comment token">// whether to display street view control. Default is true.</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Regards,
Alif