You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to draw basic shapes on the map. There's actually already an open PR that adds this: #149
It adds the methods addPolygon, addPolyline and addCircle with some options. E.g. to fill them with a solid color and to adjust the color of the stroke (i.e. the border of the shape).
However, to be on par with the API the Google SDK offers, some additional functionality is needed as well.
We will first focus on completing the functionality of the polygon shape only. Later on, we will add similar functionality to the polyline and circle shapes as well. This way we keep the scope smaller. The requirements are as follows:
The API in the PR regarding the polygon (as said above) only has the addPolygon method right now. But it should be on par with the API that the Android SDK of Google itself offers (can be found here).
More specifically, this will thus entail the following changes:
1. Keep a list of drawn polygons. This means a polygon that is added, should be saved in some sort together with an guid. For reference: the addMarker method has similar functionality.
2. The PolygonOptions of the PR already supports specifying the points, tag, strokeColor, fillColor, strokeWidth, zIndex and the visibility. Support should also be added for clickable, geodesic, holes, strokePattern, strokeJointType.
3. Add a getPolygon(id: string) method, that returns all properties of the specified polygon. For reference: the getḾap method has similar functionality.
4. Add a updatePolygon(id: string, preferences: object) method, which accepts the same preference parameters as the addMarker method, so the polygon can be updated.
5. Add a removePolygon(id: string) method, so a polygon can be removed (remember to update the list mentioned in 1 as well).
Bonus 1: it should be possible to - instead of a solid color fill - apply a pattern of images to a polygon. For more information, check this Stack Overflow question
Bonus 2: it should be possible to place the shapes on top of the markers. Normally they are drawn behind the markers.
It should be possible to draw basic shapes on the map. There's actually already an open PR that adds this: #149
It adds the methods
addPolygon,addPolylineandaddCirclewith some options. E.g. to fill them with a solid color and to adjust the color of the stroke (i.e. the border of the shape).However, to be on par with the API the Google SDK offers, some additional functionality is needed as well.
We will first focus on completing the functionality of the
polygonshape only. Later on, we will add similar functionality to thepolylineandcircleshapes as well. This way we keep the scope smaller. The requirements are as follows:The API in the PR regarding the
polygon(as said above) only has theaddPolygonmethod right now. But it should be on par with the API that the Android SDK of Google itself offers (can be found here).More specifically, this will thus entail the following changes:
addMarkermethod has similar functionality.PolygonOptionsof the PR already supports specifying thepoints,tag,strokeColor,fillColor,strokeWidth,zIndexand thevisibility. Support should also be added forclickable,geodesic,holes,strokePattern,strokeJointType.getPolygon(id: string)method, that returns all properties of the specified polygon. For reference: thegetḾapmethod has similar functionality.updatePolygon(id: string, preferences: object)method, which accepts the same preference parameters as theaddMarkermethod, so the polygon can be updated.removePolygon(id: string)method, so a polygon can be removed (remember to update the list mentioned in 1 as well).Bonus 1: it should be possible to - instead of a solid color fill - apply a pattern of images to a polygon. For more information, check this Stack Overflow question
Bonus 2: it should be possible to place the shapes on top of the markers. Normally they are drawn behind the markers.