-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCircle.getGeometry() returns point, should return polygon? #163
Comments
Sounds reasonable to me. Will you create a pull request? |
After testing some different ways to fix/change this behaviour, I am not sure any more what actually is the best solution for storing, displaying and calculating of "circles" would be. There was a huge discussion on the jts mailing list ~5 years ago and they didn't come up with a solution that works good for all use cases. Calculating a buffer with X points per circle-quarter as done by geotools is quite CPU expensive and makes it difficult to edit these geometries later on. Maybe extending the LCircle.getGeometry() |
sounds reasonable - any proceedings on this issue?
|
I think there is a change in the latest version that takes the center point into account in zoomToContent, but still no improvements to really obey the whole geometry. There is a lot of things in queue for me to do in this project, this would really be a good place for contribution ;-) |
Currently LCircle.getGeometry() returns a JTS point.
v-leaflet/src/main/java/org/vaadin/addon/leaflet/LCircle.java
Line 78 in 070307d
If a developer uses for example a LDraw.FeatureDrawnListener, then stores the JTS geometry (
FeatureDrawnEvent.getDrawnFeature().getGeometry()
) somewhere and later on recreates the object usingLFeatureGroup.addComponent(JTSUtil.toLayer(geometry))
, the result will be only a single LMarker for that point on the map.How about changing this function to returning a polygon (buffer of size radius around the point)? JTS provides the necessary functions to calculate that: https://locationtech.github.io/jts/javadoc/org/locationtech/jts/geom/Geometry.html#buffer(double)
The text was updated successfully, but these errors were encountered: