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.
Related
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/.
I am using Google maps in an Ionic application (which connects to NodeJS/Express) for ipad.
In the app, I am displaying markers for the addresses provided by the user. My use case is such that users need to view the google map with markers when they are offline. These are primarily field users who do not have access to internet when on the field.
The approach I was thinking was to have users launch the google maps with markers set, in the ionic app (when they are connected to the internet) and provide a save button. Once they click on the save button, we somehow save an image/screenshot of the maps view on the device.
When the user opens the map while offline we load this image instead.
What would be the best way to save the image of the map shown in a Ionic app? Is there another approach which I should be looking at?
Thanks.
option 1: I think here you can use Google Static Maps api which returns image files you can call this api when user clicks on save button (obviously when you have internet connection), and cache the image locally. Just go through the Google Static Maps api
option 2: I don't prefer this but worst case if nothing works for you just take a screen shot of the user's screen and save that image. Here is the cordova plugin to take screenshots cordova-screenshot
Happy coding :)
I want to download a 300 dpi image of a styled google map for printing purposes. I know i can already download 300 dpi image of a basic map via google my maps. But i want to download 300 dpi image of this map: https://snazzymaps.com/style/122/flat-map-with-labels (or any other styled map)
Is there any way? I will try doing a styled map via my own website but even then, how will i download a printable version of it?
you can use the Google Maps Static Maps API V2 to download a map. Look at the styled Maps section for more information on styling.
This is the example given in the documentation.
using it for free limit your image size to 640x640, you can apply for Google Maps API for Work to gain access to 2048x2048 image size.
We have implemented Google Maps in an app for tourists but we want to provide seamless offline maps. We can generate these from the OSM data and we can even display these on the Google Maps with a negative zIndex which means they generally only show when the online map tiles are not available. However there are some issues with this approach:
1/ After going offline, for a while, Google Maps shows a very poor version of it's map (i.e. if you zoom in it is very blurry).
2/ As user moves around the map, sometimes the cached tiles (poor quality usually) show up and disappear.
3/ We can't control the zoom level when offline and so sometimes our map tiles won't be shown if the user zooms too much.
Ideally we'd like to be able to know if google maps can't load a tile so we could display our own. Is this possible? Or can we fix the above issues?
I have created a webpage http://babysoftblog.co.cc/shahma/kmz/map_sexten.html in html5 with offline cache.its showing google map using a kmz file.the page is working fine online..but its not showing google map when page is o[en offline.
Am i doing any mistake?
Google Maps can't be used offline like that. Google Maps is much more than just the initial Lib, for example images, location data etc. If your website doesn't require all the navigation feature, I recommend check out Static Map API.
Initially you include the static map, which is just image file that can be cached offline, then check for connectivity status and load the dynamic map later (aka Progressive Enhancement).