Skip to Main Content
Feature Request FR-3549
Product Area Page Components
Status ROADMAP

5 Voters

Map Region: point layer appearance - allow marker symbols to be centered over map objects

pf.fledderus Public
· Dec 10 2023

Idea Summary
The map region is great and I have used it extensively since its release. Currently, the point layer type allows the use of icons or SVG Shapes where the center of the shape bottom is pointing to the map object. I would like an option to position icons and SVG shapes so that the center of the shape is over the map object.

For example, allow SVG coordinate 10, 10 to point to the map object instead of the default SVG coordinate 10,20.

Use Case
This is useful for any icon that is not pin-shaped, especially shapes such as circles, triangles, and squares. I believe users naturally assume that a circle on a map is centered on top of the feature it represents.

There are many feature types that are traditionally displayed with symbols centered over their coordinates. For example, in the water and wastewater utility sector, maintenance holes, valves, meters, and connections are typically displayed as symbols centered over their location, so that they appear centered over the pipe line feature underneath.

Preferred Solution
In the map region, when editing a Layer of the “Point” layer type, add a select list or switch to the “Point Objects”  section that allows the developer to choose how to center/position the symbols. 

Note that although I am only requesting one additional option for symbol positioning, perhaps there are more to consider in the future. The true center of the shape and the center of the shape bottom are the two most useful options, but there may be others I am not thinking of (for example, if someone wants to use a diagonal arrow as the symbol, positioning the corner of the shape over the feature would allow the diagonal arrow to point to the feature).

This is currently on the roadmap for a future release of Oracle APEX.

Comments

Comments

  • rodney bailey OP 1.4 years ago

    One thought that may provide for this requirement, but simplify the implementation is to allow for any icon to be used to represent the point, but connect the icon to the point with a line, allowing the icon to float at a position defined by a degree angle setting (thereby allowing you to position the icon at any angle on the map around the point).

  • carsten.czarski APEX Team OP 1.4 years ago

    Until that idea gets realized, you might use the following technique to achieve your goal:

    About centering the layers, there is a workaround for it using the Map Libre API. User would have to create a Map Initialized dynamic action and set the icon-anchor layout property to “center”:

    // Give layers a chance to be added
    setTimeout( () => {
        let region = apex.region( "map-region-static-id" ),
            map = region.getMapObject();
    
        map.setLayoutProperty( region.getLayerIdByName( "{layer-name}" ), "icon-anchor", "center" );
    }, 500);
    
  • pf.fledderus OP 1.4 years ago

    @carsten.czarski Thank you Carsten!