Hiding Lon / Lat in Map Component

HI All,

Loving getting to know Glide! Have a quick question and a bit of a dichotomy.

To show a pin on the map the Location co-ordinates need to be used (and therefore displayed on the map pop up to then view the detail) in the address field of the map component. Can this be hidden with some CSS?

Thanks for any insight into this tricky little one. Do I just bite the bullet and go Google Maps?

Best

John

It can be hidden with CSS, yes.

  1. Give your map component a CSS class like no-lon-lat
  2. Go to settings → appearance → custom CSS and type the following:
.no-lat-lon [class*="map-collection-lazy___StyledDiv11"] {
display:none;
}

Let me know if this works.

2 Likes

Hi Robert, Great to hear from you. I’m busy working through your content. Great stuff! Can you point me in the right direction to this bit: 1. Give your map component a CSS class like no-lon-lat
Thanks

Hi Robert, Mmmm I had been using the following;

.mapboxgl-marker
div[title=“Pub”] svg path {
fill: #3EA69B;
}

To mark different points of interest in different colours. Now that seems to have stopped working. Have you come across any changes in the CSS elements that could have caused this?

Best

J

Ignore that Robert I worked that last bit out. I had changed where I stored the [title field so it no longer matched the logic. idiot!!! Still need a little help with 1. Give your map component a CSS class like no-lon-lat. If you can spare a moment.

Thanks

Hi Robert, I’ve added the no-lon-lat to the small CSS box on the map component and then added the

.no-lat-lon [class*=“map-collection-lazy___StyledDiv11”] {
display:none;
}

To the Custom CSS in the Settings, Appearance, Custom CSS

No change in the appearence. On inspection of the that inthe browser console I can see the following:

div class=“map-collection-lazy___StyledDiv11-sc-18k1f56-15 jViAfW”>52.98965467591023, -2.5113333639172777

As an example of on of the pop ups. Does this bit

-sc-18k1f56-15 jViAfW

have any relevance after the map-collection-lazy___StyledDiv11

Best

J

Did you enable “Preview Custom CSS” in Settings->Appearance?

Hi Robert, I’m an idiot. I cannot spell!! All solved. Thanks.

Hi Darren, Thanks. I sorted it out. I had a typo!!! Next!!

2 Likes

Just seeing this thread— apologies. Glad you got it sorted!