-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed In Tumblr? #994
Comments
I don't know what Tumblr's rules are about embedding JavaScript... did they allow your code to pass through unscathed? If so, the next issue is cross-site restrictions... does maxotics.com have CORS set up so you can access bricks_dzi.dzi from a different site? If not, and if you can't set it up, you'll need to pull the info out of that dzi file and interpret it directly in the code. Here's an example of how to do that: http://codepen.io/iangilman/pen/gpejpJ Another option, especially if Tumblr doesn't like you putting JavaScript in, is to build your viewer in maxotics.com and then embed it in your Tumblr with an iframe. |
I tried creating a Tumblr post with your code, same result, a "gray box" where the image should be. I believe the Javascript is working fine but Tumblr interfers with loading external images, unless you use a simple |
Sorry to hear that! Sure looks like it's possible to use both iframes and JavaScript in Tumblr: http://word-association.tumblr.com/post/90361184916/embedding-iframes-in-tumblr-posts http://stackoverflow.com/questions/20552391/javascript-on-individual-tumblr-post Perhaps there's just something not quite right. Can you post a link to your tumblr page so I can take a look? |
Okay, think I'm getting there. The iFrame will be USABLE, if I can't get the straight method to work. For the iFrame I have
The straight-forward OpenSeadragonr version shows the buttons, but no image, so there may be hope. Interesting that these posts did not work in preview mode. Anyway, my Tumblr is at: http://maxotics.tumblr.com/ Again, thanks for your help, Iangilman! This is my last attempt at the raw method, going back to your original example. I have OpenSeadragon in my Tumblr template.
|
Okay, definitely looks like the JavaScript is running fine on Tumblr, it's just a matter of sorting out the code. The issue I see above is your
Give that a try! |
Used CDATA to get that in there. Still not working. Not sure what you mean about the "change contents to what's on your server" way above. For example, does dziFilesURL point to the folder of the files, or the dzi file? Sorry, think we're close. This is what I have at moment
|
What happens if you remove the CDATA tag? Seems like you probably don't want it. Other than that your code looks good. The http://maxotics.com/imagezooms/bricks_dzi.dzi (but with the return characters removed so it's all a single line) |
If I remove the CDATA tag it translates < into < code. Anyway, put in contents from DZI file and didn't work. Also tried you code, and again, Tumble translates the < into <. Stuck again. |
Well, if the problem is just dealing with the <, you don't actually need the raw xml... you can copy its data directly into the dzi configuration object. The only reason I suggested the xml solution is to make it easier for you to update. Anyway, if you manually copy the bits of info out of the xml and put them in the code, you end up with something like this:
...which hopefully should work! |
This is what I have for your code trying to get it to work, still no luck. Tried both your original sample, and what I have. Let me know if you're out of ideas Ian and I'll take it up on the Tumblr forum.
|
Okay, I just put my code in Codepen: http://codepen.io/iangilman/pen/mEaGmN ...and found that the files URL was wrong... it should be:
Besides that, my code works. By the way, now that you have a number of attempts on your Tumblr you now have three divs with the id The other thing I'm seeing when I look at the developer console on your Tumblr is a couple of errors about OpenSeadragon not being defined yet... it doesn't seem to be a problem with the code at the top, but it might be worth looking at the sequencing of what gets loaded when. |
If only my bonehead typo fixed it :) I deleted some posts and made the div unique. I looked into the code and noticed that it wasn't including OpenSeadragon in my tumblr account, so I added it again to the post, in-line. I also changed themes to clean out anything that might interfere. Looks like it's doing something, but still blank. Thank you again for hanging in here!
|
Getting there... you've just got a bit of a mash-up of different versions. This should work:
|
Sorry Ian, tried that, then played around with some different ideas, templates, still no dice. |
Oh! It's complaining because we're trying to access the div before it exists... we just have to flip the order like so:
(I also removed a couple of paragraph tags that seemed unnecessary). |
Ian, YOU THE MAN! It's working! "Quit" is apparently not in your vocabulary. |
Awesome! I had faith we'd get it sorted out :) |
I can't get code into this post. Arggh. Anyway, my daughter Alice came up with a partial fix for how Tumblr shows gray boxes in dashboard mode for Openseadragon. You can read it at the end of my blog post here: |
Nice! Thank you for sharing the info! I've tweeted the link: https://twitter.com/openseadragon/status/773635575635062785 Another thought for dashboard view is that you could include an http://maxotics.com/imagezooms/Sunflowercool_dzi_files/9/0_0.jpeg |
Thanks Ian, I'll try that next time I post. After 4 months I finally have a robotic "digitiler" working. I hope to start taking "real" photos tomorrow. It should really show off Openseadragon! |
Hi Ian,Also forgot to mention we're building a web site for the images at Digitiler.com Mark is going to make something really nifty eventually. For now, it's a WP mod.Thanks!Max |
Exciting! I look forward to seeing digitiler.com in action. I haven't had any more thoughts about Facebook. Let me know if you make it work! Regarding having the entire image in a single file, there are ways to do it, but I believe it requires a little bit of intelligence on the server. Here's one project that's underway on the topic, by @eriksjolund: There are also a number of servers that support the IIIF format (which OpenSeadragon can read). Take a look at the servers section on this page: Some of them support using a single JPEG2000 image and they do the tiling on the fly. |
Hi Ian
|
I think the work on single file solutions is interesting, but for my own work I've always just gone with the multi-file solution (like you started with). I agree that moving the files around can be a pain, but I like the simplicity of it all... everything is where you expect it to be. Zipping it all up and transferring it and then unzipping on the server is probably a good optimization if you can get it to work. Regarding annotations, you're saying you want them to come and go depending on your zoom level? OSD doesn't have anything built in for that, but it should be fairly easy with overlays... watch for zoom events on the viewer and then add or remove overlays as appropriate for your zoom level. Regarding zooming into the house then inside, are you saying you want them to be separate layers, and at some point the house layer goes away so you can explore parts of the inside that would otherwise have been obscured by the exterior? You can do that with multi-image. Again you'll have to watch for zoom events and manage the opacity of your layers appropriately. It's exciting to see all the great work you're doing! |
Is it possible to embed OpenSeaDragon in Tumblr. I tried this but didn't work. Ironically, I've never used Tumblr; however, think it would be a cool way to show these things off.
The text was updated successfully, but these errors were encountered: