简体   繁体   中英

javascript error when using google maps ASP.NET GoogleMaps User Control

When I try to run the google maps on an asp .net page I get a javascript error saying that it doesn't like the key I'm using but I have the key from google

can anyone help please?

Edit - this is the key that google provided:

ABQIAAAAcPBSoXRloZCu5tYnhpZBCBRrxSVjvAJ3kkmtcIQSxWeYirsDfxTECPvByIoh90G8hcPG55N3s_3E2g

Code:

<cg1:GMap ID="gMap1" runat="server" Height="250px" Width="350px" enableServerEvents="true"
                            Visible="False" serverEventsType="AspNetPostBack" />

It seems that you're using the GoogleMaps control for ASP.NET

Where are you setting the key?? Onload?

Try to set it at the web.config

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM