<geocoderesponse>
<status>REQUEST_DENIED</status>
<error_message>Requests to this API must be over SSL. Load the API with "https://" instead of "http://".</error_message>
</geocoderesponse>
So change to https in:
1. Suppliers.php Line 417
2. CustomerBranches.php Line 112
3. geocode.php Line 40
4. geo_displaymap_customers.php Line 34
5. geo_displaymap_suppliers.php Line 34
6. SelectCustomer.php is OK but deleted line 619 changed line 618 to:
I am sure there should be more cleanup reg. geocoding.
At my production site (v.4.12.3 ) everything works fine showing maps, but at my developer site (4.15.1) no maps shows up, no JavaScript error messages, just an empty page (??)
Have to dive deeper into this, but for now, just trying to find obvious errors in code.
Maybe we should wait a bit before commit changes to GitHub?
Jan
Last edit: Paul 2021-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Paul
I have re-wrote most of the code in GeoIntegration for Google Maps API v3 for
SelectCusomer.php and SelectSupplier.php
and converted the code from Google Maps API v2 to v3 for
geo_displaymap_customers.php and geo_displaymap_suppliers.php, (that's why those pages didn't show anything)
For the last two files I struggled to find a way but found the solution from a site, and the "missing" piece from another, should these been credited? ...but I did some changes but don't want to be credited for others work. https://www.creare.co.uk/blog/js/loading-google-map-markers-via-xml https://stackoverflow.com/questions/32922017/google-maps-individual-marker-infowindow-how-to
Btw, "sensor=false" is deprecated in v3 so I dropped that.
This is too much code changes, so I decided to attach all four files in a zip-file if that's ok?
The API key is missing In line 113 causing Google geocoding request message: REQUEST_DENIED
Change line 113 fix that:
$request_url = $base_url . $address . ',&sensor=true';
to:
$request_url = $base_url . $address . "&key=" . KEY . '&sensor=true';
Isn't there a bug reporting forum somewhere?
Last edit: Paul 2021-02-28
Thanks for the report and the fix, Jan!
A similar change was needed in a few other places too.
The GitLab commit credited to you.
Yes, there is a webERP forum for bugs, development discussions, and more.
Thanks Paul for quick answer, and link to the bugs, development etc.
i knew it was there in the "old days" :)
Paul, i discovered a typo (double quote AND single quote) in Suppliers.php when updating my files
Line 418:
$request_url = $base_url . $address . '&key="'. KEY . '&sensor=true';
should be:
$request_url = $base_url . $address . '&key=' . KEY . '&sensor=true';
Last edit: Paul 2021-03-06
Doh! ... thought I double-checked all those!
Thanks for the report Jan, file updated.
Last edit: Paul 2021-03-06
One more error in geocoding scripts;
So change to https in:
1. Suppliers.php Line 417
2. CustomerBranches.php Line 112
3. geocode.php Line 40
4. geo_displaymap_customers.php Line 34
5. geo_displaymap_suppliers.php Line 34
6. SelectCustomer.php is OK but
deleted line 619
changed line 618 to:
I am sure there should be more cleanup reg. geocoding.
At my production site (v.4.12.3 ) everything works fine showing maps, but at my developer site (4.15.1) no maps shows up, no JavaScript error messages, just an empty page (??)
Have to dive deeper into this, but for now, just trying to find obvious errors in code.
Maybe we should wait a bit before commit changes to GitHub?
Jan
Last edit: Paul 2021-03-07
I'll commit as we go, I don't have an API key to test, so your efforts are helpful.
sounds like that area broke sometime between 4.12 and 4.15, there have been some minor changes to geocoding since then.
Thank's Paul
Will go through the branches and see what i can find.
Protocol changes committed!
Hi Paul
I have re-wrote most of the code in GeoIntegration for Google Maps API v3 for
SelectCusomer.php and SelectSupplier.php
and converted the code from Google Maps API v2 to v3 for
geo_displaymap_customers.php and geo_displaymap_suppliers.php, (that's why those pages didn't show anything)
For the last two files I struggled to find a way but found the solution from a site, and the "missing" piece from another, should these been credited? ...but I did some changes but don't want to be credited for others work.
https://www.creare.co.uk/blog/js/loading-google-map-markers-via-xml
https://stackoverflow.com/questions/32922017/google-maps-individual-marker-infowindow-how-to
Btw, "sensor=false" is deprecated in v3 so I dropped that.
This is too much code changes, so I decided to attach all four files in a zip-file if that's ok?
Thanks, yes, that is ok. I've haven't yet had a chance to take a look, but I will.
Last edit: Paul 2021-03-13
Thanks for this mygroundbiz
I'll commit as we go, I don't have an API key to test, so your efforts are helpful.
Really, I hope it's always true | couponswa