Does org.primefaces.model.map.Polygon support donut holes?

UI Components for JSF
Post Reply
warjaguur
Posts: 5
Joined: 20 Apr 2015, 23:03

03 Oct 2022, 22:17

I'm trying to develop a GIS like app, with JSF 2.3 and Primefaces 10.0.0

So, I'm using the p:gmap component to embed the map and it's overlays on the view.

I'm trying to draw on screen a Polygon that has holes inside.

Image

But I'm afraid it's impossible, because of the data model of the Polygon class:

Code: Select all

package org.primefaces.model.map;

import java.util.List;

public class Polygon extends Overlay {

    private static final long serialVersionUID = 1L;
    private List<LatLng> paths;
    private String strokeColor;
    private double strokeOpacity;
    private int strokeWeight;
    private String fillColor;
    private double fillOpacity;
//getters and setters...
}
It seems to support only a simple list of LatLng objects, which I think are the coordinates (ordered clockwise or counter-clockwise) of the outer boundaries of the Polygon.
Does the primefaces gmap component lack support for inner boundaries or holes?

According to the KML spec, a Polygon should support one <outerBoundaryIs> tag with it's list of coordinates. and many <innerBoundaryIs> tags/objects, so a Polygon can have one or many holes, and only one outer boundary shape.

If the answer is "NO, Primefaces gmap lacks support for holes or inner boundaries". Is there some kind of alternative or work around?

Thanks!

I'm developing with :
JSF 2.3 (mojarra)
Primefaces 10.0.0
Netbeans 13
Wildfly 26
Using:
Wildfly 26
JSF 2.3
PrimeFaces 10.0
NetBeans 13

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests