The HTML code is around 70,000 characters because the map is SVG—it’s way too much for the HTML embed character limit. Any suggestions for how to do this?
Thanks @AlexManyeki! So I’m able to host the scripts and CSS in my dropbox and call them. This may be a silly questions, but how would I call HTML that’s hosted externally on my dropbox in Webflow?
Awesome, thanks for the tip. So my only remaining problem is that for these maps, I have to paste HTML into the page. The problem is the HTML includes some SVG code that’s super long (70,000 characters) so I’m not able to just paste it into a HTML embed in Webflow.
Is there a way to link to this HTML similar to the way I’m linking to JS and CSS? Looking at this W3 method for including HTML: How To Include HTML Am I on the right track?
Its in the way you are calling your dropbox links;
replace all www.dropbox.com references with dl.dropboxusercontent.com. The former is a sharing link to the download page and not to the raw file itself;
@AlexManyeki, you mentioned above to host the scripts on CDNJS or jsdelivr instead of dropbox. I have these scripts, as well as the HTML file and some video. Could I host these on my own website and call it from there? Any issues you see with that?
I’m hosting this site with Webflow. The other website is hosted elsewhere and I have FTP access. I noticed Webflow just added hosting for documents which I’ve been hoping for. Maybe one day they’ll have a way to do this sort of thing without going outside Webflow.
@AlexManyeki, sorry to both you again with this. I’m trying to get this to work.
First of all, I’m trying to use a link from my own website for the HTML snippet (as mentioned above). For some reason I can get the map to show up on the published site when I pull the snippet from Dropbox, but not from my own site. The link to my own site works (if you open it in another window, you can see the map) and nothing else about the code has changed.
Secondly, the javascript and CSS aren’t working. The map should have dots and county rollovers but it’s not showing up. What is really strange is that occasionally it WILL work. I won’t change a thing and come to the page and it works. It’s just very unpredictable.
My public site is here, the HTML embed pulling the map is on the page called “Chapter 2” about halfway down. I currently have one embed pulling the snippet from dropbox, another one trying to pull it from my website.
So strange, not the map isn’t loading at all, either from dropbox or my own site. I’m worried about how finicky this is, I want to make sure it’s more reliable on the final site. I’m wondering now if it’s just a speed thing. Perhaps it’s just loading really slowly.
From what I could see the JS from my site is loading with no trouble, I think?
It’s also strange that in the source for the published site the dropbox include shows up as all the code from the HTML file I’m pulling. The include from my site simply has the HTML embed code from dropbox. For some reason it’s not firing. I wonder if it has something to do with my link or with where my site other site is hosted.
Wondering if the following errors make sense to anyone out there?