Jannis
23 February 2020 12:43
21
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.
steveb
23 February 2020 12:50
22
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.
Jannis
23 February 2020 13:01
23
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 "
.
steveb
23 February 2020 13:11
24
Single quotes kills OSM completely, double quotes don’t work.
tav
23 February 2020 13:25
25
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.
Jannis
23 February 2020 13:42
26
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?
tav
23 February 2020 14:40
27
Yes, like this
<a href="%id=link -href%" target="%id=link -target%" rel="%id=link -rel%" class="%id=link -class%">
1 Like
steveb
23 February 2020 15:53
28
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 :-)
Jannis
23 February 2020 16:16
29
I have to built it into the stack. Give me some time.
2 Likes
Jannis
24 February 2020 21:57
30
I updated OpenStreetMap Stack to version 2.2.0. The CSS class will now be included in the link.
3 Likes
Jannis
25 February 2020 08:54
31
Please when you have time check if Limelight works now 🙂
steveb
25 February 2020 08:59
32
Ahead of ya, just finished testing… Working perfectly :-)
Couple of future requests…
Set map height in percentage of screen height.
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.
steveb
25 February 2020 09:01
33
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.
Jannis
25 February 2020 09:05
34
Thanks!
steveb:
Set map height in percentage of screen height.
Should work already.
That will not work.
Let me check, could be that I have to adjust something.
steveb
25 February 2020 09:07
35
Jannis:
Should work already.
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
Jannis
25 February 2020 10:00
38
2.2.1 is out fixing this.
2 Likes
steveb
25 February 2020 10:37
39
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.
Jannis
25 February 2020 10:39
40
what do you mean with “work”?