If you are using “New York City” then you are doing a geo look up and your unrestricted key needs to be enabled on the GeoCoding API as well as the map API – is your key enabledfor GeoCoding?
The plugin doess work when keys setup correctly, see a live demo https://fullworksplugins.com/docs/simple-shortcode-for-google-maps/usage-simple-shortcode-for-google-maps/demo-geo-lookup/
However unrestricted keys are bad for your bank balance if you use the anywhere pubilc.
But if you restrict your key by domain the geo api wont work, so you would have two keys key=xxxxx (restricted by domain) and geokey=yyyy ( restricted by your web server IP )
the plugin does work
This is covered in the readme
geokey – Description: Your Google Geocoding API Key – Allowed values: valid key
Why two key? If you restrict your API key to specific APIs you need to use the geokey to allow the geocoding to work ( enabled on the GeoCoding API, with your server IP ) and key
enabled on the Maps JavaScript API
https://wordpress.org/plugins/simple-google-maps-short-code/
and the FAQs
Why do I get REQUEST_DENIED error?
This is likely to be an issue with the authorization you granted to your API key see Google API REQUEST_DENIED troubleshooting
It is recommended that you set an Application Restriction to restrict your API key from others using it.
However restricting the referrer HTTP will cause this error ‘API keys with referer restrictions cannot be used with this API’, this is because the geoencoding is performed server side and cached server side, so there is no browser referrer.
If you get this message change your restriction to IP addresses (web servers, cron jobs, etc.) using the IP address of your website.
If you restrict your API key to specific APIs make sure you enable at least
* Maps JavaScript API
* Geocoding API
but may benefit from a clearer explanation, especially given the examples
Yes the API key I created has no restrictions on it right now because it was created only for testing purposes. I used New York City to make a simple demo for testing purposes that was exactly the same as what’s shown in the documentation. (I do agree the documentation could be a bit clearer, perhaps by including a shortcode example with the geokey, or explaining which types of addresses would require the geokey).
So with all that said, this still isn’t working for me. We were using this just fine on a production site until about a month ago, it seemed to have stopped working. I have now setup a test on a personal site with no traffic to try to figure out the issue. Any other thoughts as to what the issue might be?
Here’s a sample page, that uses only the Twenty Twenty Four theme has no other plugins activated: https://eesblueprint.wpenginepowered.com/one-service-red-service/
The last version would not work without a geokey i just updated it to work with either or key or geokey.
I also add a ‘live preview’ where you can test unrestricted keys and updated the readme.
Hopefully it will work for you know with just one unrestricted key.
Thank you! This is now working correctly with an unrestricted key and no geokey.
Now I will set up the proper restrictions and test again and let you know.