50
Views
7
Comments
Solved
[OutSystems Maps] How to put title below icon in map?
Question
outsystems-maps
Reactive icon
Forge asset by OutSystems

I want to put title below icon in map. What should I do now?

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Whis  

Just ran some tests using the same approach from a post I answered a while ago (here) and I'll attach a sample since it works as expected.

  1. Created a block wrapper for the Markers

  2. On the screen replaced the Marker with the new MarkerBlock:

  3. Created a CSS class called 'marker-label-custom' in the module theme:
  4. In the MarkerBlock, created an OnReady event with the following script:
  5. The Result 😎

You can check Google Maps documentation here to learn more about the label interface (it was basically what I've done)

Hope it helps.

Cheers,
GM

MarkerSetLabel.oml
2022-12-27 03-57-41
Whis

Many thanks u. I'm done. 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Whis,

What are you using to display the map? A Forge asset?

2022-12-27 03-57-41
Whis

I'm using OutsystemsMaps.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Ok, I updated the question to point to OutSystems maps. Can you share some code of what you did? Because I'd think that this is not standard behaviour.

2022-12-27 03-57-41
Whis


Here I have a list marker. Each marker has icon + label.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Whis 

Can you please share an oml with what you've tried so far using javascript and, share a link from Google Maps API where we can see what you're trying to achieve since, at least for me, it wasn't clear?

Cheers,
GM

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Whis  

Just ran some tests using the same approach from a post I answered a while ago (here) and I'll attach a sample since it works as expected.

  1. Created a block wrapper for the Markers

  2. On the screen replaced the Marker with the new MarkerBlock:

  3. Created a CSS class called 'marker-label-custom' in the module theme:
  4. In the MarkerBlock, created an OnReady event with the following script:
  5. The Result 😎

You can check Google Maps documentation here to learn more about the label interface (it was basically what I've done)

Hope it helps.

Cheers,
GM

MarkerSetLabel.oml
2022-12-27 03-57-41
Whis

Many thanks u. I'm done. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.