OpenSeaDragon image viewer using image from Google Drive - google-drive-api

I have thousands of high-resolution images that I would like to display on my website. I would like to select an image from Google Drive, dynamically tile the image, and display it on the website using OpenSeaDragon. Is that possible? If so, how do I go about it?
Thanks!

Can you get a link to the image on Google Drive? I assume so. Given that, you have a few options:
Paste the URL into https://openseadragon.github.io/openseadragonizer/. This should be plenty fine, as long as your image isn't terribly big; it loads the whole image and then tiles it in memory.
If your image is very large, you can paste its URL into https://zoomhub.net/, where it'll tile it on the server.
If you want to make your own viewer, follow the instructions on https://openseadragon.github.io/docs/. For the image tile source, try https://openseadragon.github.io/examples/tilesource-image/; this is what option 1 above uses.
If you're making your own viewer, and the images are too big to work with the simple image tile source, you'll want something like https://openseadragon.github.io/examples/tilesource-dzi/. You'll need to do the conversion yourself using something from https://openseadragon.github.io/examples/creating-zooming-images/.

Related

EXPORTING A MAP REPORT TO EXCEL OR PDF

i am an Brasilian Web Developer, and i am making an report of phone calls geolocation in an virtual PABX ( asterisk ), already working fine with google maps API V3.
OBJECTIVE Export this report into a PDF or Excel, so i am thinking in turn the map into a image, to export after:
What i already try:
Create a Static Map dont solve my problem because i have a marker for each calls, and i am clustering markers with MarkerClusterer
I converted my map in Canvas using html2canvas, after my html turned in canvas i used canvas2image to create an <img> element, for simple html this solution works perfect, but in case of google maps the result is that:
Unfortunately i cannot post images because i have no reputation, i always visit StackOverflow but its my first time making a question, but i can describe that the image generated from the canvas have just the gray google maps background and the number of markers of the markerclusterer.
You can see the image here to understand better:
I am thinking in something like take a screenshot of the page and crop to just pick map region, but any sugestions that can solve the problem or give me a way will be very welcome.

Possibility to adjust brightness or to apply blur effect on Leaflet Map?

I know it is possible with Google Map API v3 (MapTypeStyler option) but do you think it is with Leaflet API ?
Thing is that I have text that cover a map I need to make more visible by adjusting brightness or - even better - by applying blur effect like in this example : http://www.hongkiat.com/blog/css-filter/
CSS shader looks very promising but supported only with latest Chrome browser.
The text over the map is modal (user must interact with button) and I could add overlay with a PNG image file. I don't like to much this solution that need unnecessary file to be transfered to the client.
Thank you,
Leaflet is very lightweight and simply puts references to tile images on your html page. So I see two options to change the look of the tiles:
CSS
Which indeed depends on the browser.
Custom tiles
Leaflet will display tiles from any server. You can for example pick one of the many styles served by cloudmade or make one of your own there.
Or use a tool like TileMill to create (and perhaps even host) them yourself.

Printing google maps in black and white

A lot of my clients(companies) want to print google maps (with directions) on b/w printers. But when we tried to do this - maps became agly because google maps has litle contrast and small resolution. As a result - everething on map isn't clear visible. We tried all possible settings of the printer and nothing couldnt help.
How to solve this programly? How make google maps (with routs on it) contrast ang good resolution?
Try reading the Styled Map section of the Google Maps API. They even have a wizard that could help you create a grayscale map.
Not a direct answer but something that indirectly solved the problem for me.
Overview - use freeware image editor 'IrfanView' to 'flatten' the image to b/w, using a custom threshold (not supported in standard IrfanView).
copy the map image from Google maps to the clipboard
paste into IrfanView
install the free 'threshold' plugin into IrfanView
3.1) Download FineThreshold from http://www.mehdiplugins.com/english/finethreshold.htm
3.2) Unzip it and save it in a known location.
3.3) In IrfanView, go to Image / Adobe 8BF Plugins / Filter Dialogs.
Use 'Add 8BF filters' (file) to locate and load the filter.
Use 'start selected filter' to invoke the actual filter.
Note the 'ok/cancel' buttons remain grayed out but work.
I found ~228 was a good threshold value for Google Maps. Just slide around that mark, and see when the background switches from black to white. You have to hit 'ok' for each value to see the impact. Then you have to exit the plugin to return to the main IrfanView window.
Try http://www.openstreetmap.org , select cycle map (on stack top right). Labels are slightly bigger than on Google, contrast is better (still not great)
this looks better fit for your need
https://snazzymaps.com/style/79/black-and-white
you can print with markers and labels also.

Thumbnail quality in Google Drive API

I am going to create a slideshow app reading images from Google Drive. The images in Google Drive are mostly in high resolution. Therefore, I have to resize them to 1000x1000 and save to my server to display the slideshow.
I figured that there is a "thumbnailLink" (e.q. "https://lh4.googleusercontent.com/{hash}=s220") attribute in service.files().get() API, and I can simply modify the link to return 1000x1000 by replacing "s220" to "s1000" However, the image quality from thumbnailLink doesn't look so good. Finally, my solution was to download the entire hight-resolution images to my server and resize them.
It would be nice if Google Drive API can provide higher resolution thumbnails or have a attribute in thumbnailLink to set the image quality, that would save much bandwidth transfer between Google Drive and my server.

google maps upload photos as markers

i am trying to make a custom page that would look like this
if i have a page where you can upload an image and enter description which feeds into a sql dB using PHP, how could one create a map of image thumbnails instead of markers? this photo was taken from: http://www.blocsoft.com/bmap/ but after browsing thru their site i didnt see anything about image thumbnails as markers
An alternative, but less flexible, approach would be to store the photographs in Panoramio and enable the maps Panoramio layer http://code.google.com/apis/maps/documentation/javascript/layers.html#PanoramioLibrary
You're going to want to do this via Javascript.
See http://code.google.com/apis/maps/documentation/javascript/overlays.html#SimpleIcons
Example # http://code.google.com/apis/maps/documentation/javascript/examples/icon-simple.html
Basically, you can use PHP to populate the markers within the javascript markup, then let JS init it.