CARA MENDAPATKAN API KEY GOOGLE MAPS DENGAN LISENSI RESMI

      177

The thangvi.com Example App comes with a Google Maps widget you can use on any page. The location the widget should display as well as a couple of display options can be mix via the widget properties.

Bạn đang xem: Cara mendapatkan api key google maps dengan lisensi resmi

However, after closing the properties dialog, the map might not be displayed if you haven’t provided the phầm mềm with a Google Maps API key.

Here’s how such a key can be obtained và then set in the Example App.


First, you need khổng lồ have sầu a Google account và be logged in to it, of course. Then, open https://developers.google.com/maps/gmp-get-started#api-key. Google lets you make 1000 API requests per key for free.


Cliông chồng “Select or create project” and create a project if you don’t have sầu one already and only want khổng lồ look up the key. Then clichồng NEXT to have your key generated.


*

Afterwards, your new API key is displayed; you might want to lớn copy it lớn the clipboard for pasting it lớn the Example App later on.

Xem thêm: Giới Thiệu Về Lazada Việt Nam, Những Điều Nên Biết Về Lazada


We recommover to lớn not cliông xã DONE now but switch to lớn the “API Console” to lớn protect your key from being used illegitimately.


*

*

Next khổng lồ replacing the key with a new one (in case it has been misused) or deleting it, the Google API Console lets you restrict the use of the key to lớn specific websites. We highly recommkết thúc doing this by specifying all the sites the key is used on as “HTTPhường referrers”, including your local development URL (localhost:8080) và your production, pReviews, và staging sites.


After entering your HTTPhường. referrers, save sầu the changes you made in the API console, và you are ready lớn go! By the way,Google provides a Dashboard for managing all your Google APIs và services.


*

The Scrivilớn Example App has several website-related (not just page-related) settings which can be accessed via the “Site settings” tab in the homepage properties. So, navigate to the homepage and open the page properties in Edit mode. Then scroll down và paste your Google Maps API key to lớn the corresponding input field, & cthảm bại the dialog.


*

That was it! You can now reload the page containing the map or change the location to lớn be displayed in the widget and see how the bản đồ gets updated.

Don’t forget to lớn publish the working copy to activate your maps for the visitors of your site.