Jump to content
uniGUI Discussion Forums
Sign in to follow this  
deljavan

How Add Marker in map ?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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;

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

×