jasper07/openui5-googlemaps

google maps api key?

js1972 opened this issue · 3 comments

Where and when do you set the api key. According to the google maps javascript api you need to supply an API key in the script download but your sample don't seem to do this even though the ScriptUtil object does have the capability to set an API key..?

sorry for late response, sample app2 has an example of using a key

openui5.googlemaps.ScriptsUtil.setApiKey('AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM');

i think this feature a long with many others needs documenting

emdac commented

Hello

I am starting to use the library.
As the app2 example, I put the following code in the component.js file

sap.ui.getCore().loadLibrary("openui5.googlemaps", "./openui5/googlemaps/");
openui5.googlemaps.ScriptsUtil.setApiKey('AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM');

But the following error occurs
openui5 is not defined

Any clue ?

best regards

Emmanuel

Hi Emmanuel

Have you declared openui5 resource root see the index.html of said app

jsp