Following the work of @steven-jones at #2799311: Support geometry collections.
Refactored the patch to work on latest beta16 and added support for more geometries.
I tested the patch and it's working on beta16 (Drupal 8.6.2 and 8.7) with
Point,
Polyline,
Polygon,
MultiPoint,
MultiPolyline,
MultiPolygon,
GeometryCollection.

Meanwhile I notices the bug at #2905407: L.MultiPolygon is not a constructor (Leaflet 1.2.0). This patch solve that problem and add support for MultiPolyline->polyline not considered in that issue but strictly related.

Comments

viappidu created an issue. See original summary.

itamair’s picture

thanks @viappidu ... reviews on this might start and are really welcome

itamair’s picture

Although the Patch is not compliant with Drupal patch naming conventions
I did a review of the posted patch, and the outcome is that it cannot be accepted, for the following reasons:

  • The Patch naming is not compliant with phpcs/Drupal coding standards (missing functions commenting, bad indentation of code lines, etc)
  • The Patch is not working properly with Multipolygons with holes, such as the following:

    MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))

    if compared to thefix_multipolygon_const-2905407.patch one, that has just been committed into the new 8.x-1.0-beta17 release. (Screenshots attached)

itamair’s picture

Version: 8.x-1.0-beta16 » 8.x-1.0-beta17
Status: Needs review » Needs work
itamair’s picture

(content removed)

itamair’s picture

Status: Needs work » Closed (works as designed)
itamair’s picture

Status: Closed (works as designed) » Needs work
itamair’s picture

I amended and extended the previous patch with this one that overrides everything and applies upon the 8.x-1.0-beta17.
Everything seem to work nice on all the above mentioned geometries
(just the pop infowindow over a GeometryCollection won't show up ...).
Going to commit into dev, deploy a new 8.x-1.0-beta18 release and close this issue.

  • itamair committed 40c9839 on 8.x-1.x
    Issue #3017492 by itamair, viappidu: Support complex geometries
    
itamair’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.