Below is what i did and got stuck.
I have this two coordinate taken at different times of the same structure, would like to show this two coordinates on a basemap or uses google map. Indicate the difference in distance.
Code: Select all
function ShowlocMap()
map locatn_map;
// set the basemap at the subdistict level
string basemap_filename = maketext("../Maps/Mbtiles/%d.mbtiles",ACTION_SELECT_CLUSTER);
if fileexist(basemap_filename) then
locatn_map.setBaseMap(basemap_filename);
// if the basemap does not exist, they can still look using Google Maps
else
numeric checkfile_google = errmsg("The basemap cannot be located: %s. Continue using Google Maps?", basemap_filename)
select("Cancel", continue, "Use Google Map (Requires Internet)", continue);
if checkfile_google = 1 then
exit;
endif;
endif;
// adding each structure from the listing data (with GPS coordinates) to the map
// ?? How do i change the type of marker and color for the Listing Structure on the MAP
if loadcase(LIST_STR_DICT,ACTION_SELECT_CLUSTER,SELECT_HH)=1 then
locatn_map.addMarker(XLATITUDEAH,XLONGITUDEAH);
endif;
// adding each structure from the previous household data (with GPS coordinates) to the map
// ?? How do i change the type of marker and color for HH Structure on the MAP
if loadcase(HH_STR,ACTION_SELECT_CLUSTER,SELECT_HH)=1 then
locatn_map.addMarker(CLATITUDEAH,CLONGITUDEAH);
endif;
//WHERE I STOP
//?? how to generate the distance between the Listing and HH Structure
// ?? Use a textbutton to show the distance
//?? Show the current location
//?? Navigate from current location to file 1
end;