Hi,
I’m trying to get leaflet working(in a Code widget). It all goes well, until I inserted an image in the leaflet-popups code. That code works standalone(with images) and in iFrame in Blocs. But not in Code-widget. It seemed that Code-widget scrambled up code and also inserted class=" "(for whatever reason).
Thanks, for looking into it!
But my main point is:
code works as is, (even in code-widget), without insertion of <img src=https://phantom-bilder.com/images/high2/Quattro-300px.jpg>
into pop-ups.
And full code works standalone and in iFrame.
But it totally scrambles in code-widget(see first two pictures), with above part.
If you want to use the code bric you need to do it properly. And also untick the preview option of the code bric. Preview can cause issues with code. There is a big IMPORTANT box right under the preview tick box.
Regarding your second issue there are issues with the way you are trying to code that.
One way to do this is too add a variable for the image in the script and then add that variable to the popup.
eg.
var popupImage = '<img src="https://phantom-bilder.com/images/high2/Quattro-300px.jpg"/>';
And then the Popup looks like this
.bindPopup("<b>Hello world!</b><br>I am at wildsee."+ popupImage);
Here is a working example. And also how I would tidy it up with adding stuff to the page header and footer.
Thanks a lot!
I’m just a beginner with Blocs, and web. I have not much knowledge with html coding. But i´ve done a lot in three.js. But it was strange, that code-widget scrambled up code, that was otherwise working!
Thanks for tip with preview option, just overlooked that!
But I had this project in mind, where I wanted to observe all the Hunting stands in my neighbouring forests(we have really a lot, it is really a part of german “forest culture”), and clicking on the position of one should show a picture of it!
Ultimately, a carousel underneath should show the full picture.
Is it possible that a carousel in Blocs loads a certain image, or move to a specific image, by code?
Thanks,
Disabling app preview, that is what @PeteSharp also said.
But its a big mutation going on in code-widget
Just have a look at the first two pictures…
But I will follow @PeteSharp advice, that was only a first tryout.
Michael