google base map in  javascript api 3.8

2199
1
Jump to solution
06-27-2014 01:16 AM
by Anonymous User
Not applicable
Original User: Murselinho

Hi everyone,
someone can help me,
How can I add google base map on my own maps. i saw some example but ? am using api 3.8
0 Kudos
1 Solution

Accepted Solutions
JakubMalec
New Contributor III
I'm using nliu's GoogleMapsLayer with ArcGIS v.3.9 api.
I think I had some problems with getting it to work and don't remember if I had to modify the layer's source code so I'm attaching the GoogleMapsLayer I'm using to this post.

Here is the documentation:
http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.05/docs/googlemapslayer/

Remember to add the package to your dojoConfig var. Also remember that the map's spatial reference has to be Web Mercator (auxiliary sphere) - EPSG 3857 / 102100, otherwise the layer won't work.

Example for layer instantiation:
require(["agsjs/layers/GoogleMapsLayer"], function(GoogleMapsLayer){     var googleLayer = new GoogleMapsLayer({         apiOptions: {             v: '3.16'         },         mapOptions: {             mapTypeId: "roadmap",             streetViewControl: false         }     });     googleLayer.id = "googleLayer";     map.addLayer(googleLayer); });

View solution in original post

0 Kudos
1 Reply
JakubMalec
New Contributor III
I'm using nliu's GoogleMapsLayer with ArcGIS v.3.9 api.
I think I had some problems with getting it to work and don't remember if I had to modify the layer's source code so I'm attaching the GoogleMapsLayer I'm using to this post.

Here is the documentation:
http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.05/docs/googlemapslayer/

Remember to add the package to your dojoConfig var. Also remember that the map's spatial reference has to be Web Mercator (auxiliary sphere) - EPSG 3857 / 102100, otherwise the layer won't work.

Example for layer instantiation:
require(["agsjs/layers/GoogleMapsLayer"], function(GoogleMapsLayer){     var googleLayer = new GoogleMapsLayer({         apiOptions: {             v: '3.16'         },         mapOptions: {             mapTypeId: "roadmap",             streetViewControl: false         }     });     googleLayer.id = "googleLayer";     map.addLayer(googleLayer); });
0 Kudos