Google Maps v3 api for localhost not working

后端 未结 3 2126
庸人自扰
庸人自扰 2020-12-05 01:47

I wanted to try out a sample demo of implementing Gmaps v3 and tried out this example from Google\'s documentation, but there is no output , the page just loads for a few se

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 02:25

    it's very easy! in the new API code, you should enter your referrers. So for your localhost test:

    LEAVE IT EMPTY

    here is also the google api explanation:

     Accept requests from these HTTP referrers (web sites) (Optional)
     Use asterisks for wildcards. 
    

    If you leave this blank, requests will be accepted from any referrer.
    Be sure to add referrers before using this key in production.

提交回复
热议问题