WebMapLocation Address "Request_Denied"

  1. 3 weeks ago
    Edited 3 weeks ago

    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

  2. Greg O

    Jan 28 Xojo Inc

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

  3. Edited 3 weeks ago

    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)

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

  5. Greg O

    Jan 28 Xojo Inc

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

  6. Edited 3 weeks ago

    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

    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)

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

    Unhandled NilObjectException
    Message: Status: REQUEST_DENIED

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

  7. Edited 3 weeks ago

    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...

  8. Greg O

    Jan 28 Xojo Inc
    Edited 3 weeks ago

    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.

  9. Edited 3 weeks ago

    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...

  10. Oliver O

    Jan 28 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro
    Edited 3 weeks ago

    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

  11. Edited 3 weeks ago

    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?

  12. Greg O

    Jan 29 Xojo Inc
    Edited 3 weeks ago

    @Michael B 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.

or Sign Up to reply!