Skip to content

Drawing on the map #13

@cookieguru

Description

@cookieguru

It would be great to have an API to draw on the map. For starters I can envision three shapes:

  • Lines. A constructor could look like:
new Line({
  points: [ [lat, lon], [lat, lon], ... ],
  strokeColor: "blue",
  strokeWeight: 2
});

Similar to the other Tabris.js APIs the various color paramaters could take a Color which would eliminate the need for a separate key to specify opacity

  • Polygons. Similar to Line but with optional stroke color and fill. There would probably be an implied connection between the first and last points if they differ. A constructor could look like:
new Polygon({
  points: [ [lat, lon], [lat, lon] ],
  strokeColor: "blue",
  strokeWeight: 2,
  fillColor: rgba(50, 50, 255, 0.5)
});
  • Circles. A centerpoint and a radius A constructor could look like:
new Circle({
  center: [lat, lon],
  strokeColor: "blue",
  strokeWeight: 2,
  fillColor: rgba(50, 50, 255, 0.5)
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions