mel47 Posted January 13, 2024 Posted January 13, 2024 Hi, I used this module since long time and it worked fine. But I wanted to change an address today and I got an REQUEST DENIED error. I didn't change anything to my API key. I just check, and Geocoding API and Maps JavaScript API are enable. I updated to 3.0.0 module also recently, so I don't know if it's related or not. Thanks
Christophe Posted January 13, 2024 Posted January 13, 2024 { "error_message" : "The provided API key is invalid. ", "results" : [], "status" : "REQUEST_DENIED" }
hellomoto Posted March 8, 2024 Posted March 8, 2024 Why is there a set method in the Fieldtype and in the MapMarker class?
Andy Posted June 5, 2024 Posted June 5, 2024 Hi @ryan console log shows js?key=XXXXXXXXXXXXXXX:175 As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker. While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed. At least 12 months notice will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for the migration guide.
FireWire Posted June 10, 2024 Posted June 10, 2024 @ryan just opened a PR on Github that should resolve the issues above. Module appears to be working as expected now. 1
DrQuincy Posted February 13 Posted February 13 Has something changed with the module? Or has Google changed how the keys work? If you enter an address in the search input once it loses focus it geocodes on the front end. All good. But if you type a new address and save it it tries to geocode on the backend and you get a REQUEST_DENIED error since you can't have a key (unless you have it unrestricted, bad idea) that works by both referrer and IP address and both coordinate fields are set to 0. I'm sure it didn't used to work this way. Why does it even bother to do server side geocoding if you can only set one key? Is there any way to force it to geocode on the front end only? And sorry I might be misremembering but couldn't you click a point on the map and put the marker there? I can't seem to do that now.
FireWire Posted February 15 Posted February 15 @DrQuincy Please see this comment on the thread for my translation module and Google Cloud Translate. It appears that something did change and might be similar to your situation. 1
DrQuincy Posted February 16 Posted February 16 Thanks @FireWire. I tried your PR code but it didn't work for some reason. I have ended up adding this to the $(document).ready() code at the bottom: $('.InputfieldMapMarkerAddress input[type="text"]').each(function() { $(this).on('keydown', function(e) { if (e.key == 'Enter') { e.preventDefault(); // Trigger Geocode by removing focus on search box this.blur(); return false; } }); }); It just prevents the form being submitted on hitting the enter key and blurs the input forcing it to geocode client-side. This seems to work for me although I haven't really tested it much yet.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now