Page 1 of 1

Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:08 am
by rganguly
Hi,

Ready to use javascript, google map with info is not working. In browser console it is showing "google is not defined". Error in GoogleMapInit.

Please help...

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:10 am
by Pablo
Did you enter your API Key?

Note: if you need help then always include the URL of the page (or a demo project).
In this case, a demo project will not work, because Google Maps only works online.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:11 am
by rganguly
Pablo wrote: Thu Nov 10, 2022 7:10 am Did you enter your API Key?
Yes, it was working on WWB17.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:12 am
by rganguly
Pablo wrote: Thu Nov 10, 2022 7:10 am Did you enter your API Key?

Note: if you need help then always include the URL of the page (or a demo project).
In this case, a demo project will not work, because Google Maps only works online.
It is not working after publish it on xampp on my localhost.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:23 am
by Pablo
There are no differences in this script. it 100% the same as in WWB18. Because it's a standard Google script.

It will not work on a local host because the API key is associated with your domain.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 7:56 am
by rganguly
Pablo wrote: Thu Nov 10, 2022 7:23 am There are no differences in this script. it 100% the same as in WWB18. Because it's a standard Google script.

It will not work on a local host because the API key is associated with your domain.
Okay, got that, my bad.
Thanks....

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 10:32 am
by h3rnan
Hi, if you don't want to fight with api..I have created an extensión for that, check my extensions in webbuilderfx.com
I dont use api key and Is always working ok.
It's an alternative.
Kind regards.
Hernán.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 11:59 am
by alan_sh
I don't use JS at all. I find the map location on Google maps. Click on the 'share' link and get an iframe url from there. I then insert it into an HTML object and put that into a layer grid.

Works fine. Here's an example https://www.manhoc.hoc.org.uk/

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 12:03 pm
by h3rnan
alan_sh wrote: Thu Nov 10, 2022 11:59 am I don't use JS at all. I find the map location on Google maps. Click on the 'share' link and get an iframe url from there. I then insert it into an HTML object and put that into a layer grid.

Works fine. Here's an example https://www.manhoc.hoc.org.uk/
Exactly, the idea of my extension is just to add the code. Without using api key.
Many of my clients have had problems with the api and the best solution I found is with the code directly and bye bye api key.

Re: Ready to use javascript google map not working

Posted: Thu Nov 10, 2022 3:36 pm
by rganguly
h3rnan wrote: Thu Nov 10, 2022 12:03 pm
alan_sh wrote: Thu Nov 10, 2022 11:59 am I don't use JS at all. I find the map location on Google maps. Click on the 'share' link and get an iframe url from there. I then insert it into an HTML object and put that into a layer grid.

Works fine. Here's an example https://www.manhoc.hoc.org.uk/
Exactly, the idea of my extension is just to add the code. Without using api key.
Many of my clients have had problems with the api and the best solution I found is with the code directly and bye bye api key.
Hi,

Ready to use javascript Google map with info is not working even on the original domain and server.
Showing "google is not defined". Google iframe is working fine. Thanks to @h3rnan & @alan_sh.