Jump to content

drawing on unimap in runtime


freedowsRoO

Recommended Posts

On 6/24/2020 at 7:59 AM, Hayri ASLAN said:

Hi,

In the demo, we explained clearly how to create a vector. You will use onMapClick event to create a vector

Sorry ASLAN i saw the demo but it's still not clear how to draw the vector in runtime.

 

I tried to use the following code to draw the vector but it's add only one point at time in my map, it's not connect the points and draw the vector.

with UniMap1.Vectors.Add do
  begin
    AddPoint(lat, lng);
    VectorType:=mvPolygon;
    with Options do
    begin
      color:= UniColorButton1.Color;
      fillColor:= UniColorButton2.Color;
      weight:= Trunc(UniNumberEdit5.Value);
      opacity:= UniNumberEdit6.Value;
      fillOpacity:= UniNumberEdit7.Value;
      radius:= Trunc(UniNumberEdit8.Value);
    end;
    AddToMap;
    FitBounds;
  end;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...