Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

OnMarkerDragEnd

 Post Reply Post Reply
Author
Herrera Mauricio View Drop Down
New Member
New Member
Avatar

Joined: 03 Oct 2010
Posts: 2
Post Options Post Options   Quote Herrera Mauricio Quote  Post ReplyReply Direct Link To This Post Topic: OnMarkerDragEnd
    Posted: 10 Oct 2016 at 5:31pm
Hi,

I'm working with TTMSFMXWebGMaps and the event OnMarkerDragEnd does not work on IOS, This is a bug or is not implemented?

same for:
OnMarkerDragStart
OnMarkerDrag
OnMapClick

I need the user to fine tune the location address, so is very important for us to get this event.

any ideas?

Thanks
Mauricio Herrera
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2213
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 11 Oct 2016 at 9:02am
Hi,

Can you please try adding markers as indicated in the example below?
With this technique the mentioned events are working as expected.

procedure TForm1.TMSFMXWebGMaps1MapClick(Sender: TObject; Latitude,
  Longitude: Double; X, Y: Integer);
var
  m: TMarker;
begin
  m := TMSFMXWebGMaps1.Markers.Add;
  m.Latitude := Latitude;
  m.Longitude := Longitude;
  m.Draggable := true;
  TMSFMXWebGMaps1.CreateMapMarker(m);
end;
Back to Top
Herrera Mauricio View Drop Down
New Member
New Member
Avatar

Joined: 03 Oct 2010
Posts: 2
Post Options Post Options   Quote Herrera Mauricio Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2016 at 12:12am
HI,

I have done what you recommenced, and it doesn't work either, in fact i tested the demo project (WebGMapsDemo.dproj) and it does not work on IOS and MAC, the event only works on Window.

The On MapClick, OnMarkerDragEnd, OnMarkerDrag,OnMarkerDragStart.

I just updated the compos to 2.6 Version.

Hope we get a fix

Thanks
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2213
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2016 at 10:24am
Hi,

- I have not been able to reproduce an issue with the OnMapClick event.
Can you please specify exactly how this can be reproduced?
Does the issue also occur in the WebGMapsDemo application?

- The OnMarkerDragEnd, OnMarkerDrag and OnMarkerDragStart are working as expected when using the technique specified above.
There was an issue with the events when using the Add call parameters to add a Marker which has now been fixed.
The update will be available with the next release.

If the problem persists, please provide the version of Delphi, iOS and MacOS you are using so I can further investigate this.
Back to Top
Hackbart Christian View Drop Down
New Member
New Member
Avatar

Joined: 14 Sep 2013
Posts: 13
Post Options Post Options   Quote Hackbart Christian Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 2016 at 1:24pm
I can verify this issue with Delphi 10.1 Seattle, iOS 10.1.1., WebOSMaps 2.0.0.1

My Code looks like:
[Spoiler]
unit UMain;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes,
  System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.TMSWebOSMapsWebBrowser, FMX.TMSWebOSMaps, FMX.StdCtrls,
  FMX.Controls.Presentation;

type
  TfrmMain = class(TForm)
    tbMain: TToolBar;
    lblTitle: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
    FMap: TTMSFMXWebOSMaps;
    procedure DoMapClick(Sender: TObject; Latitude, Longitude: Double;
      X, Y: Integer);
  public
    { Public-Deklarationen }
  end;

var
  frmMain: TfrmMain;

implementation

{$R *.fmx}

procedure TfrmMain.FormCreate(Sender: TObject);
begin
  FMap := TTMSFMXWebOSMaps.Create(self);
  FMap.Parent := self;
  FMap.Align := TAlignlayout.Client;
  FMap.OnMapClick := DoMapClick;
end;

procedure TfrmMain.DoMapClick(Sender: TObject; Latitude, Longitude: Double;
  X, Y: Integer);
begin
  lblTitle.Text := format('Lat: %0.2f Lon: %0.2f', [Latitude, Longitude]);
end;

end.
[/Spoiler]

It works fine on Android, MacOS, Windows, but on on iOS. It seem to be that every event is ignored. WebGMapsDemo also does not work on iOS. 


Back to Top
Hackbart Christian View Drop Down
New Member
New Member
Avatar

Joined: 14 Sep 2013
Posts: 13
Post Options Post Options   Quote Hackbart Christian Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2016 at 11:11am
I suppose the issues are caused if you compile with iOS 10 SDK and newer. 

Replacing the click event with touchend in the coasts:
 'map.events.register("click", map, function(e){' + #13 +

seem to work, but maybe somebody has a better idea?

Christian
              
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2213
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2016 at 11:59am
Hi,

I have been able to reproduce the issue in TMS FMX WebOSMaps and I'm now investigating how this can be fixed.
I will report back as soon as possible.
Back to Top
Hackbart Christian View Drop Down
New Member
New Member
Avatar

Joined: 14 Sep 2013
Posts: 13
Post Options Post Options   Quote Hackbart Christian Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2016 at 12:40pm
Thanks, i suppose because of the fact that:
           "'<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />' + #13 +"

no longer works and double tap is not deactivated. I found several message concerning this behavior on stackoverflow.

Christian
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down