• Resolved TrishaM

    (@trisham)


    I’m on the current version of MapPress (2.53.4, not Pro) and whether I select Leaflet or Google, I get the same error message when I try to edit or create a map…..

    “Unable to get your location : User denied Geolocation”

    What does this mean?

    I went through all the hoops to setup a new Google account and get a Maps API key, but that just gives the very same error message.

    In an older version (pre API requirement from Google), I had no trouble creating maps using the lat/lon to fix a POI. Now I can’t make any maps at all. ??

    Any help would be most appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author chrisvrichardson

    (@chrisvrichardson)

    Hi,

    MapPress doesn’t try to geolocate you unless you press the geolocation icon in the search box, so the message could be from the theme or another plugin that loads the maps API. You can rule this out by temporarily deactivating ALL other plugins and switching to a standard theme (like twenty nineteen), then testing the map again.

    Thread Starter TrishaM

    (@trisham)

    Thanks Chris, in that case there is a different problem. When I create a new map, I enter first a ‘title’ then use the search box to search for the area for which I want a map, but nothing happens at all when I enter info into the search box – if I use the location name or the lattitude and longitude…..nothing happens if I hit ‘enter’ and there is nothing to click on (no search icon) except for the small icon to the far right (that I now see says “your location” when I hover over it).

    So how do I get it to bring up a map? It used to just find the location when I hit enter.

    Also, we had maps already stored for each location, we just decided to go ahead and get the API from Google and update the plugin to get rid of the ‘for development only’ watermark that started appearing on our maps…..but now those maps seem to have disappeared – when I go to those pages and scroll down to the MapPress module, it shows the Title of the (old stored) map but no map info and no map shows…..

    Plugin Author chrisvrichardson

    (@chrisvrichardson)

    Hi,

    The plugin searches when you press enter in the search box. It sounds like there may be a JavaScript error preventing this, so I recommend deactivating your plugins and theme as I described earlier, then checking again.

    Try leaflet first, as it’s easier to set up (no API key).

    You may be able to see any error messages in the JavaScript console (press F12 in most browsers).

    Thread Starter TrishaM

    (@trisham)

    Thanks Chris, this is what it says:

    Google Maps JavaScript API error: ApiTargetBlockedMapError

    It links to a page at Google that explains further:

    The Maps JavaScript API has not been authorized for the used API key. Please check the API restrictions settings of your API key in the Google Cloud Platform Console.

    I am certain I’m using the correct API Key that I setup, as I copied and pasted it, and also visually verified each and every character. I did (as Google recommended) add the HTTP restriction so that the key can only be used from my site/domain (Google instructed me to setup 4 restrictions to cover wildcard use on all pages of my site as well as subdomains, which I did).

    So the error does not make sense to me. I could unrestrict it, but given that Google says that the key is sent publicly – and use of the key could possibly incur costs if we go over the limit of uses – I don’t want to unrestrict it.

    Is there some other way to fix this?

    P.S. I tried Leaflet as you suggested, but it does not find any of the specific locations I need, neither by name nor by lattitude/longitude, so I’m stuck with Google Maps.

    • This reply was modified 4 years, 9 months ago by TrishaM.
    Thread Starter TrishaM

    (@trisham)

    OK, making progress…..I had to deselect the checkboxes in the plugin that outputs scripts in the footer and prevents other plugins from using the API (although I have none that do)….now I get a different message that tells me that to display a map I have to enable Google Places….

    I dont understand why it wants google Places….I just want to show a map….I am not adding any markers or business information on any specific (street) address, do you know why it would require Places instead of Maps?

    Thread Starter TrishaM

    (@trisham)

    OK, success at last, even if not perfect.

    I have no idea why Google is so difficult, but your plugin has always been, and remains, excellent. I know I gave it a great review a long time ago, but I’ll happily update it to reflect that yours is still, IMHO, the best Google Maps plugin.

    Sadly Google is doing a lot of sh**ty things these days, including overlaying a whole bunch of irrelevant markers (for businesses in the area) all over the maps I use….. until Leaflet can do a better job I’m stuck with Google but at least now I have maps again.

    Thanks for your help in pointing me in the right direction.

    Plugin Author chrisvrichardson

    (@chrisvrichardson)

    Hi,

    I’m glad you got it working. There’s a link in the MapPress FAQ for setting up the API key that will enable all the necessary libraries. If you have further trouble, it sometimes helps to create a new key using that link:
    https://mappresspro.com/mappress-faq

    The places API is used for the search box, so that’s probably why searches weren’t working.

    Leaflet looks much better with MapBox tiles (you can enable MapBox in the MapPress settings), and MapBox has generous free usage.

    To disable business markers in Google, you can use a styled map (which requires MapPress Pro). Google’s styled map wizard will let you filter them out.

    Thanks, and enjoy the plugin!

    Thread Starter TrishaM

    (@trisham)

    Thank you very much for all the advice! I deeply appreciate your help. ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to get your location : User denied Geolocation’ is closed to new replies.