Jump to content

How Add Marker in map ?


deljavan

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

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

×
×
  • Create New...