Hello,
I am having a very difficult time trying to figure out how to implement Map Suite with our Google Maps Enterprise license. I have combed through the forums trying some of the suggested methods, to no avail. I know that Google has made some changes to their API recently and I’m wondering if that could be part of the problem.
We are created our map in the controller and passing it as the model with the view. This works perfectly when we create a standard GoogleMapsLayer.
map.MapUnit = GeographyUnit.Meter;
GoogleOverlay googleOverlay = new GoogleOverlay(“Google”, GoogleMapType.Hybrid);
googleOverlay.IsBaseOverlay = true;
googleOverlay.IsVisibleInOverlaySwitcher = true;
map.CurrentExtent = new RectangleShape(-13939426.6371, 6701997.4056, -7812401.86, 2626987.386962);
map.CustomOverlays.Add(googleOverlay);
map.Width = 820;
map.Height = 400;
return View(map);
However, we get a (403) Forbidden error when we try to user our CientId and our PrivateKey.
map.MapUnit = GeographyUnit.Meter;
GoogleOverlay googleOverlay = new GoogleOverlay(“Google”);
googleOverlay.IsBaseOverlay = true;
googleOverlay.IsVisibleInOverlaySwitcher = true;
GoogleMapsLayer googleLayer = new GoogleMapsLayer();
googleLayer.ClientId = “{OUR_CLIENTID}”;
googleLayer.PrivateKey = “{OUR_KEY}”;
googleLayer.MapType = GoogleMapsMapType.Hybrid;
googleOverlay.Layers.Add(googleLayer);
map.CurrentExtent = new RectangleShape(-13939426.6371, 6701997.4056, -7812401.86, 2626987.386962);
map.CustomOverlays.Add(googleOverlay);
map.Width = 820;
map.Height = 400;
return View(map);
With the new Google Static Maps API, a signature must be generated and sent with the ClientId, so the PrivateKey is not used as a parameter. I followed the tutorial, provided by Google, to create a signature from the PrivateKey using HMAC-SHA1 encryption. Using our ClientId and signature as parameters on a static map url, I was able to obtain a response so I know they are correct. Has the MapSuite API been updated to allow for this signature parameter or is your API decoding and encoding the PrivateKey for the signature? What is the proper way to integrate Google Maps Enterprise with MapSuite?
Thanks in advance for any insight you can provide!