简体   繁体   中英

Google maps broken without typing in www

I attached google map api to my website code. When I visit the site with normal url (www.example.com), the map can work perfectly. But when I ignore www and just type in example.com, the website still working while the map isn't. 在此处输入图片说明

Anyone has any solutions to that?

I recall the Google Maps API has a whitelist for domains that can use a particular API key.

Are both www.example.com and example.com on the whitelist?

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