Hi all,
I have filed a feedback about WebMapViewer in WebDialog does not work properly, but I don’t know if this is the same issue. I would like to get the coordinates through WebMapLocation in a loop of about 100 addresses. Here is my code:
rs = session.myDB.LoadTable(SelectString, Conditions) //my own method to load records
if rs <> nil then
While Not rs.EOF
dim location as new WebMapLocation
if len(trim(rs.Field("StreetNumber1").StringValue)) > 0 then
location.Address = "Hong Kong " + rs.field("eDistName").StringValue + " " + rs.field("StreetNumber1").StringValue + " " + rs.Field("eStName").StringValue
elseif len(trim(rs.Field("StreetNumber2").StringValue)) > 0 then
location.Address = "Hong Kong " + rs.field("eDistName").StringValue + " " + rs.field("StreetNumber2").StringValue + " " + rs.Field("eStName").StringValue
else
location.Address = "Hong Kong " + rs.field("eDistName").StringValue + " " + rs.field("eEstName").StringValue
end if
latitude = location.latitude
longitude = location.longitude
counter = counter + 1
location = nil //same result with or without this line
rs.MoveNext
Wend
end if
No matter how the addresses are different, latitude and longitude always returns the same value.