Forum Stats

  • 3,827,518 Users
  • 2,260,788 Discussions
  • 7,897,285 Comments

Discussions

How to set a unique identifier for Point Objects in APEX Maps (21.1)

Bas de Klerk
Bas de Klerk Member Posts: 563 Gold Badge
edited Sep 2, 2021 10:31AM in APEX Discussions

Hi,

Using apex 21.1

I'm developing some maps which should represent routes. So each point ( Point object) on the map is a step in a route.

Since apex maps don't (yet, hopefully soon ) support showing routes I would like to give each point objects a unique number representing the step number in the route ( so 1, 2, 3 etc ).

Is there a way to do this?

So far what I've tried is create a column in the underlying select

'fa fa-number-'||ROWNUM as ICON_CLASS

and set the point object to "icon", icon source "icon class column" and set Icon Column to the field "ICON_CLASS". But this solution is limited to 10 points since font apex only has 10 numbers.

Another possibility is to set the point object to an image URL but it would take a lot of time to generate all the pointers with numbers inside them as an image to get this working.

I don't think it's possible to stack the font apex with fa-stack and include the number stacked on another icon. Tried this but did not get the syntax to work.


Any suggestions how to show a route sequence on a APEX map with more than 10 points in the route?

Regards

Bas

Tagged:

Best Answer

  • Bas de Klerk
    Bas de Klerk Member Posts: 563 Gold Badge

    Maybe it would save someone some time searching : for now as a workaround I've purchased "101 Numbers Icons - Jolly - Black" at creativemarket.com. There's probably more out there but this one has icons scaled on the right size and numbers from 0 to 100 which should be enough for most routes. Just upload these to the application files and create a field in your map query :

    ,  apex_util.host_url('SCRIPT') || '#APP_IMAGES#numbers-black-'|| ROWNUM ||'@4x.png' IMAGE_URL

    and set the the point object to icon-image url and set it to &IMAGE_URL.

Answers

  • Carsten Czarski-Oracle
    Carsten Czarski-Oracle Consulting Member of technical Staff Munich, GermanyMember Posts: 1,336 Employee

    Hi Bas,

    the map region indeed does not support displaying text on top of a marker today. You already mentioned working with images (a lot of images to generate) or with font-apex icons ( limited amount of numbers available).

    An alternative approach could be to work with the marker color. In the SQL Query you could calculate a color sequence, e.g. from dark-red (beginning of the route) to light-red (end of the route) and assign that column as the SVG color with &COLUMN_NAME. syntax. The actual sequence number could be displayed as the tool tip on mouseover ...

    Would that be an option ...?

    Best regards

    -Carsten

  • Bas de Klerk
    Bas de Klerk Member Posts: 563 Gold Badge

    Hi Carsten,

    Thanks for the quick reply.

    I did not mention all I've tried but the color was something I did do but which is also limited (ok enough colors but would be confusing) and not a great user experience.

    In the tooltip I do already have the number displayed, that's a good one I forgot to mention, but it would we nicer to have an overview without having to hoover over all datapoints.

    I'm afraid there is no solid solution now but maybe I overlooked a setting or possibility (jquery search/replace of some kind ..., I don't think we can see the objects inside the map from the browsers console but maybe there is a way)

    Would be cool if it would be added in next release since the map extensions is great but now is limited.

    Regards

    Bas

  • Bas de Klerk
    Bas de Klerk Member Posts: 563 Gold Badge

    Maybe it would save someone some time searching : for now as a workaround I've purchased "101 Numbers Icons - Jolly - Black" at creativemarket.com. There's probably more out there but this one has icons scaled on the right size and numbers from 0 to 100 which should be enough for most routes. Just upload these to the application files and create a field in your map query :

    ,  apex_util.host_url('SCRIPT') || '#APP_IMAGES#numbers-black-'|| ROWNUM ||'@4x.png' IMAGE_URL

    and set the the point object to icon-image url and set it to &IMAGE_URL.