WebMapViewer shows wrong location

Hi all, here is my code:

  dim location as new WebMapLocation
  location.Address = "Hong Kong " +  DistrictName + " " + EstateName
  
  MapViewer1.GoToLocation(location)
  MapViewer1.AddLocation(location)
  MapViewer1.Zoom = 16
  MapViewer1.MapType = 0

For the same piece of code, the WebMapViewer sometimes work but sometimes not. Most of the time it doesn’t. I checked in the debug mode, and copy the longitude and latitude returned by google, search in google map, it shows me the correct location. While the Mapviewer brings me to somewhere in US. Any ideas?

I figured out why most of the time it doesn’t work. For the first time I login to the web app, the location shows correctly, after then, it always bring me to US.

The MapViewer is inside a container which is dynamically created in a WebDialog. Each WebDialog refers to a Premises record which may be of different address.

I am using 2017r1 that cause this problem. I opened my project with 2016r3, the problem does not exist!

Please File a bug report using Feedback with a simple example project.

In one of my own web apps (using 2017 R1.1), I remove the existing locations before showing new locations. I find that it works around the issue. The down side is that I always have to keep the last added location in a property. When saved location is nil, no need to remove of course. All my webmapviewers are within containers. I don’t know if that may make a difference.

Finally can simulate the problem with a sample project. Here it is:

https://drive.google.com/open?id=0B2DNp_dIdcJXc1luaUZza1JUaDg

At the beginning, I put the WebMapViewer in a Webdialog, it seems to work fine. However when I put the WebMapViewer in a container and then embed in the Webdialog, the problem arises. Different locations are shown for the first and the following show of the map. The latitude and longitude returned by google are correct (copy and paste to google map shows correct address). Just want to ask if it is my mistake before filing a bug report.

That’s fine. Put it in Feedback.

I downloaded twice the feedback system from Xojo: Downloads: Extras. Can’t be installed as it says : “The setup files are corrupted. Please obtain a new copy of the program”

I’ve downloaded and installed Feedback 2017R1.1 yesterday. Did not have any problem so far.

Windows?

yes … (win10)

Me same

Is your antivirus program interfering possibly?

#48422 filed.

Maybe, this is the same issue as <https://xojo.com/issue/47725>

I didn’t realise that I need a response to the case until I got an email stated the case is closed. Just requested to reopen again.

@Greg O’Lone, Yes, I do have the API key from google, the problem is still there.