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