Nice idea! Is there any plan of making method for drawing polyline?

Nice idea! Is there any plan of making method for drawing polyline?

Hi!

If we understood you correctly, this is basically adding support for drawing tools, right?

We’ve created [an issue on this]
(https://github.com/FlowingCode/GoogleMapsAddon/issues/5), feel free to add more details in there, but we’ll keep you posted on this if we decide to implement it.

Regards.

Hi,
I don’t think it’s some drawing tool - but forgive me, I have never worked directly with google maps. What I know is that “making” polylines over map is one of basic functionalities ( like placing marker or polygon ) when working with map. You can see an example on this addon also made for Vaadin but it supports Vaadin 7 and 8 https://vaadin.com/directory/component/googlemaps-add-on

Oh, sorry, I assumed that you already took a look to [our demo]
(https://addonsv14.flowingcode.com/googlemaps) and to [the source code]
(https://github.com/FlowingCode/GoogleMapsAddon/blob/de2f47684e68e8eb49d3eea50281935d5f240c6c/src/test/java/com/flowingcode/vaadin/addons/googlemaps/DemoView.java#L51), since those are already supported (you can create markers, polygons and lines from server-side).

Regards.

Yes, I did have a look, but if I use addPolygon method with 4 points, like in your demo, will it automatically make polygon even if my last point is not the same as the first?
Which method to use if I want to draw only line, not polygon, on a map?
I am not sure if I am describing this well…

You have to call this method: setClosed(false); … that will make it as an “open” polygon so it will render a line instead of a polygon.

Regards.

Great,
That’s what I was missed,
thanks, I will try it.