This project is read-only.

Where do I specify my Google Maps API key?

Mar 21, 2012 at 7:51 PM

Where do I specify my Google Maps API key?  I've seen some references to the "Key" property in some of the other discussions here, but that property doesn't seem to be available on the GoogleMap control (version 6.0).  I do see "AccessKey" & "EnterpriseKey" properties on the map control, are either of these the ones I need, or is it somewhere else?

Mar 22, 2012 at 1:31 PM

I managed to do this by changing in the project code the reference to EnterpriseKey and renaming it to the normal key one.


Mar 22, 2012 at 10:13 PM

@alfort, thanks for your response.  I'm not sure how to follow your suggestion, can you elaborate?  What project code did you change?  You renamed EnterpriseKey to "the normal key one".  I'm not sure I konw what you mean.

Mar 23, 2012 at 10:20 AM

Hi rossgrayum,

The project I changed is the source code of GoogleMap Control v6. If I am not wrong, I think I uncommented the lines:

            //if (!string.IsNullOrEmpty(this.EnterpriseKey))
            //    buffer.AppendFormat("&client={0}", this.EnterpriseKey);

And changed "&client={0}" to "&key={0}". Then you can use the EnterpriseKey property to set your key (you could also rename the property to just "Key").


Mar 23, 2012 at 4:23 PM

Thanks alfort!

Mar 23, 2012 at 5:04 PM

you are welcome!