WebMapLocation Address "Request_Denied"

Hi to all,
I try to use WebMapViewer.
When I use longitude/latitude it works.
When I use the address mentioned in the example, I got an NIL exception ErrorNumber 0 , Statues: REQUEST_DENIED
What I did wrong?
Regards
MB

PS sing mu home address (Greece), I don’t know if it is related but using the https://stevemorse.org/jcal/latlon.php
I got the coordinates of the given address…
Google give me 0,0
OpenStreetMaps wrong ones
Yahoo and Locatienet return the right ones.

Did I missed something in my ApiKey? I’mdoig my test in Xojo debug mode

If you’re using a free key, there are daily and hourly limits. Are you maybe exceeding those?

No, even from ghe first try i got this error. Tha same when try to run EddieWeb app using my own API key. I just got one and then i realised i have already owened one from 2017 when bought xojo and experiment with… i might remember that on that time had no identify any problem (xojo 2017.2)

I just deleted the old one but nothing yet. Is it possible to try yourself? I use Xojo2018.3

Something else you might try is looking in the browser’s developer tools. It will probably tell you exactly what’s wrong.

What is puzzling me is that I get the right results using longitude/latitude methods. it fails only in using the real address. Could you please elaborate? I test it on the EEWeb Xojo example.In that, I clicked on various names on the left listbox, but the map remains unchanged.

I use this code

[code]

Dim loc as new WebMapLocation

locationMap.MapType = 2
LocationMap.Zoom = 9

loc.Address = “237 Southlands Road, Bromley, BR1 2EG”
LocationMap.AddLocation(Loc)

LocationMap.GoToLocation(loc)[/code]

When the app is calling the LocationMap.AddLocation(Loc) I got

Unhandled NilObjectException
Message: Status: REQUEST_DENIED

Stack:
WebMapLocation.!LookupAddress%A1o%ss
WebMapLocation._ResetAddress%%os
WebMapLocation.Address.Set%%oi4s
WebPage1.WebPage1.Button2_Action%%o<WebPage1.WebPage1>o
Delegate.IM_Invoke%%o
AddHandler.Stub.29%%
WebButton._ExecuteEvent%b%osA1v
WebControl.!_ExecuteEvent%b%ssA1v
WebSession._HandleEvent%%oso<_HTTPServer.HTTPRequestContext>
WebSession._HandleRequest%i4%oso<_HTTPServer.HTTPRequestContext>
WebApplication._HandleHTTPRequest%%oo<_HTTPServer.HTTPRequestContext>
_HTTPServer.HTTPRequestThread.Event_Run%%o<_HTTPServer.HTTPRequestThread>

I returned back and run EEWeb example in Xojo 2017.2. In debug mode when I choose different customers I got the message

The site 127.0.0.1:8787 says…
According to Google, this location does not exist.

Is anybody else xojo user can validate the problem I’m referring to?
Thanks…

Google requires https requests now, so it doesn’t surprise me that the older demos don’t work.

But you may be running into a secondary issue. Google maps has an api key as well as their geocoder (the software that converts addresses to lat/long.

edit: WebMapLocation also has an apikey property that you must set to use it, and it is different that the main google maps key as I recall.

I think i have done already correctly this as the first key obtained back to 2017 was worked. But in order to verify it could you please give the link where i could obtained such a key in order the xojo webmapviewer to work properly? It is not mentioned anywhere in the xojo documentation…

I just learned from this youtube video that the latest example is no longer using google, but some other webservice. Maybe this causes your issue?

https://youtu.be/adba6dvhdPY

Thanks,Oliver.
I need to have access to maps from a web app, using windows.
If I understand correctly I can do that using the maps services/Mapbox?
Where I could find all the files that Paul used in this nice example video?
Google maps is not an option anymore using WebMapViewer?

In the video, Paul is showing the use of MapBox for a Desktop application and is only grabbing a picture of the location for display in a canvas. It does not allow users to scroll or zoom the map like they can with Google.

WebMapViewer is for use in Web apps.

The example project in the video is in the 2018r4 Examples folder. Just look for Eddies Electronics.

I’m having the same issue with the example code for using a WebMapViewer, I’ve tried about every manner of “address” I could come up with so far, I’ve tried encoding the address (which replaces the comma’s and spaces with %2c and %20 etc). I’ll investigate the problem as I can through the browser development features. Of course I have the Google Maps API and an active billing account yada yada set up. IF I set the Latitude and Longitude properties of a WebMapLocation the map updates just fine. If I set the only the Address Property – no bueno. I got the Lat./Long. coordinates just by googling them. I suppose I can (hopefully) call another google service to convert the address to coordinates. I was looking on the available functionality to do that and noted that it says google typically returns an ARRAY of weblocation objects when sent an address. Hmmm. I’m only starting my investigation. I’ve read dozens of existing forums posts from many years gone by. I see where people have employed all manner of “workarounds” (mostly abandoning the Google API stuff in favor of a different map service provider). I’m going to try and get this to work. Unfortunately I’m not privy to the underlying WebMapViewer code ya?

I seem to remember that the API key for geocoding is different than mapping now. That might be the issue.

I’ll look but near as I can tell, my API key is the correct Google Maps key. It supports 8 API calls. Interestingly I expected the call to use the embedded maps …but my Google consoles says my requests are going through the the non embedded java API. Both are supported from my key. Oh yea, as I recall the function to get a “web location” has a property for its own key. That could be it. Maybe I need a different key for the get web location.