Jump to content


Photo

How Add Marker in map ?


  • Please log in to reply
17 replies to this topic

#1 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 07 November 2017 - 12:01 PM

how add marker in map ?

 

I encountered an error when adding a marker to the map.

          RemoveAllRoutes;
          RemoveMarker(1);
          Mark.Latitude := Lat_;
          Mark.Longitude:= Lng_;
          Mark.Tag      := 0;
          Mark.clickable:= True;
          Mark.draggable:= false;
          Mark.animation:= maNone;
          Mark.labelClass   := 'mylabelInst';
          Mark.labelVisible := false;
          Mark.AddToCluster := True;

          if not Ins_View.FieldByName('latitude').isnull then
          begin
            AddMarker(Mark,false);
            SetCoord(Ins_View.FieldByName('latitude').Value,Ins_View.FieldByName('longitude').Value);
          end;

3v25_1.png


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 07 November 2017 - 12:24 PM

Hi,

 

Need to analyze, make a simple testcase for this if possible


  • 0

#3 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 07 November 2017 - 12:38 PM

sample


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 07 November 2017 - 01:26 PM

Sorry, I think you need to simplify the example and upload again, it seems there are many related modules


  • 0

#5 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 07 November 2017 - 01:35 PM

Can I use Unigmap to work with the map ?


  • 0

#6 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 09 November 2017 - 10:13 AM

Hi,

 

Have you tried this approach ?!:

http://forums.unigui...pin/#entry36214

 

Best regards,


  • 0

#7 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 10 November 2017 - 12:03 PM

Hello
I used the example described with the above changes
But when Marker put it, she showed it at sea
Why ?
 
 

Can I use Unigmap to work with the map ?

 
Help
 
 
 
athv_map.png

  • 0

#8 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 10 November 2017 - 12:10 PM

Hi,

 

Do you use a modified SetCoord procedure ?!

procedure TMainmForm.SetCoord(Lat, Long : Real);
begin
  if WebMode then
    UniSession.AddJS('var gm=googleMap;if (typeof gm=="object") {var latlng = new google.maps.LatLng('+
                        StringReplace(Format('%2.4f', [Lat]), ',', '.', [rfReplaceAll])+','+
                        StringReplace(Format('%2.4f', [Long]), ',', '.', [rfReplaceAll])+
                      '); gm.setCenter(latlng); gm.setZoom(8);'+
                     
'var marker = new google.maps.Marker({'+
                      'position: latlng,'+
                      'map: gm,'+
                      'title: "Hello!"})}');
end;

  • 0

#9 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 10 November 2017 - 12:40 PM

Yes


  • 0

#10 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 10 November 2017 - 12:47 PM

Sorry, perhaps you are doing something wrong, make a simple testcase for this

 

Attached File  moscow_map.png   189.08KB   2 downloads


  • 0

#11 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 10 November 2017 - 01:02 PM

please see ....

Attached Files


  • 0

#12 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 11 November 2017 - 11:55 AM

Hi,

Without a marker, map works for you?
  • 0

#13 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 11 November 2017 - 12:20 PM

No,

 

I had a basic question
Can I use gmap?
If this problem is resolved, I can also use the compilation tool
I remember that Farshad had said that you should have the license application. I bought the license right now. But I still have trouble using the compass and point in the sea

  • 0

#14 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 11 November 2017 - 12:23 PM

Which edition are you using?
  • 0

#15 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 11 November 2017 - 12:25 PM

1.0.0.1416


  • 0

#16 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 25 posts

Posted 11 November 2017 - 12:47 PM

You can help me to fix this


  • 0

#17 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9867 posts

Posted 11 November 2017 - 02:44 PM

Hi

Having a license does not necessarily resolves coding issues. It is a neccessity for developing apps in the first place.

Thanks

Sent from my SM-N900 using Tapatalk
  • 0

#18 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9867 posts

Posted 11 November 2017 - 02:48 PM

Can I use Unigmap to work with the map ?

Is unigmap a third party control?

Sent from my SM-N900 using Tapatalk
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users