Skip to content

how can one draw a polygon on the map at given coordinates #845

Answered by devemux86
stleusc asked this question in Q&A
Discussion options

You must be logged in to vote

The following code seems to work:

Style style = Style.builder()
        .fillAlpha(0.3f)
        .fillColor(Color.BLUE)
        .strokeColor(Color.BLUE)
        .strokeWidth(2)
        .build();
vectorLayer.add(new PolygonDrawable(style,
        new GeoPoint(-20d, -20d),
        new GeoPoint(20d, -20d),
        new GeoPoint(20d, 20d),
        new GeoPoint(-20d, 20d)));

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@stleusc
Comment options

Comment options

You must be logged in to vote
5 replies
@stleusc
Comment options

@stleusc
Comment options

@demiantres
Comment options

@stleusc
Comment options

@demiantres
Comment options

Answer selected by devemux86
Comment options

You must be logged in to vote
1 reply
@stleusc
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@stleusc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants