Launch Limelight Map from link inside OpenStreet Map Stack?

I am only using the href of this link currently.

@tav when you evaluate the link classes, are you doing that in js document ready? Asking because OSM is completely build in js on document ready. Thinking if I add the classes there (If I am able to access a CSS class on a link element at all), will your code still be able to get initialized? Mean if your code runs first, it will still not work.

As an aside, can the class be included in the href?

I did try putting…

<a href="javascript:void(0)" class="azahar">text here </a>

In to the link box, but it didn’t work.

Try to:

Remove the link completely

Add following inside the text box (I don’t know if it will work not at my Mac right now).

<a href='javascript:void(0)' class='azahar'>This text launches it using Garys class thingie. </a>

See that I only used single quotes '.


If that does not work, try double quotes ".

Single quotes kills OSM completely, double quotes don’t work.

No, I wait longer until window.load() fires to give things maximum chance to be there.

Looks like from the above reports from @steveb that the class name is not getting through to the HTML on the page at all though so nothing to bind to.

Yeah, therefore I separated into text and a link.

@tav do you know an equivalent to %id -href% to get the additional attributes from a link?

Yes, like this

<a href="%id=link -href%" target="%id=link -target%" rel="%id=link -rel%" class="%id=link -class%">

1 Like

Thanks for all the help on this folks, but I can’t crack it, over my abilities levels I’m afraid!

I’ve reworked the page and gone a different direction as a workaround.

Appreciate the effort you all put in on a Sunday though :-)

I have to built it into the stack. Give me some time.

2 Likes

I updated OpenStreetMap Stack to version 2.2.0. The CSS class will now be included in the link.

3 Likes

Please when you have time check if Limelight works now 🙂

Ahead of ya, just finished testing… Working perfectly :-)

Couple of future requests…

  1. Set map height in percentage of screen height.
  2. Different zoom levels per breakpoint.

Only weird thing I fould when updating was I had to pull the old version of the stack from the page and add a fresh instance of it, with the new version, then add back the links. But not a biggie.

Thanks everso much for that.

Oh shite… Some links not working when live, the class seems to be leaking into the link title.

EDIT: In fact the only one that works is for the first link maker, which is the pin for Costa Blanca. The rest, as in markers 2 to 10, don’t work.

Thanks!

Should work already.

That will not work.

Let me check, could be that I have to adjust something.

If I use a percentage, say 80%, the map doesn’t appear. I’ve changed the live page desktop, tablet and phone to a percentage, and there is no map. (Ignore the large desktop size in the image, I’ve set it to 800px so I can work on the live page.)

Use 80vh instead of 80%. I am not familiar with OSM but that should work.

1 Like

D’oh! Thanks.

2.2.1 is out fixing this.

2 Likes

Updated, restarted, not working at all now :-(

First market link will work once, none of the others work, and the first marker won’t work a 2nd time.

what do you mean with “work”?