Topic: MAP create and compute area

Hello MVD.

Is there a possibility to create or compute area using the map module here in MVD?  If yes, please give us a sample.

Thank You!

manixs

Re: MAP create and compute area

Hello.


Please, download latest beta version
https://www.dropbox.com/s/wutj7mnux7f3a … a.zip?dl=0


procedure Form_Map_OnPolygonClick (Sender: TObject; IdPolygon: Integer; MouseLeft, MouseRight, MouseMiddle: boolean);
begin
    ShowMessage(Form.Map.GetPolygonAreaSqMeters(IdPolygon));
end;
Dmitry.

Re: MAP create and compute area

WOW thanks MVD.

Pls also give us  a sample on how get the length on the route.

Thanks you so much!

Re: MAP create and compute area

manixs2013 wrote:

WOW thanks MVD.

Pls also give us  a sample on how get the length on the route.

Thanks you so much!

procedure frmRoute_MapRoute_OnPolylineClick (Sender: TObject; IdPolyline: Integer; MouseLeft, MouseRight, MouseMiddle: boolean);
var
    Dis: double;
    i, c: integer;
    PathItem1: TPathItem;
    PathItem2: TPathItem;
begin
    Dis := 0;
    c := frmRoute.MapRoute.Polylines[IdPolyline].Polyline.Path.Count-2;
    for i := 0 to c do
    begin
        PathItem1 := frmRoute.MapRoute.Polylines[IdPolyline].Polyline.Path[i];
        PathItem2 := frmRoute.MapRoute.Polylines[IdPolyline].Polyline.Path[i+1];
        Dis := Dis + frmRoute.MapRoute.Distance(PathItem1.Latitude, PathItem1.Longitude, PathItem2.Latitude, PathItem2.Longitude);
    end;

    ShowMessage(FloatToStr(Dis) + ' km');
end;
Dmitry.

Re: MAP create and compute area

Hello MVD!

Bravo! CLAP CLAP CLAP!

Thanks a lot!

manixs