Saving Leaflet.js maps as a static image - image

I'm trying to find a good method for allowing end users to save Leaflet.js maps as a static image (e.g. PNG, JPG, etc.). Mapbox.js (built on top of Leaflet.js) provides a nice method, but I assume this requires having your maps hosted on Mapbox so that they have a Map ID through their API. Does anyone know how I can do this with a Leaflet.js map that cannot be called through an API? Such as my example here?
Thank you all!
Eli

This thread is a bit dated, at the time of this answer, but there are a few leaflet plugins that appear to tackle this now.
Leaflet Print Plugins

Related

How can a google static map be saved as an image that can be used not just the URL to googles api

How can a google static map be saved as an image that can be used not just the URL to Google's API?
Sorry if this as been answered somewhere but everywhere I look people point to the static map quick example but this is not good as it's the saving of the static map that I need to find out.
Any help would be much appreciated
You should use the Static Maps API https://developers.google.com/maps/documentation/staticmaps/
This tool might be of use to use to you as well: http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/examples/optionsWizard.html
Not sure if this is exactly what you're looking for, but this is what i've used.
http://www.prodraw.net/online-tool/google-maps-image-generator.php
you can use address or GPS location to generate that section of the map, change the color of the pointer as well as the zoom level.
Once completed, you have the option to either link to that image or save the image.
Just take a screenshot of the map and save as JPG
If you want this image to link to somewhere, wrap it in an <a> tag

find similar image in library to photo

I work at a printer where we generate thumbnails of artwork for orders and store them in a folder before printing.
I'm looking for a code library that will allow us to take a photo of a printed item and look through the library of thumbnails for the design.
Just wondered if anyone knows of a library or api that could do this?
Thanks
David
pHash is one solution.
There are others but that mainly depends on your requirements: do you only want to identify identical images, if not, what types of transformations do you want to be able to capture etc.
In general you should look for near duplicate image search.
#david-jennings there are numerous methods to look for similar images in libraries. Remember that google already does this in google images.
Your problem falls under the scope of Content Based Image Retrieval (CBIR), which aims at looking for images with similarities in their content. MPEG-7 is a standard established many years ago to address these issues and the research field is very active with new techniques being developed constantly.
The main idea in CBIR is to extract some kind of a signature from an image and try to match it with all previously extracted signatures of all images in your database. Which method to use depends upon the specifics of your problem... According to your initial post I suppose that probably the use of SHIFT is going to do the work for you...
You may implement such a system using OpenCV with C/C++/Java/etc., or something more "scientific" using MATLAB.

Zoomable image like google maps

I would like to create a website that has a large image of a tree from a distance on. When you zoom in it shows more defined image of the branches and then zooming in further the words will display in the braches. You can scroll the image to see all the other words. So its like google maps but for my own image.
I have tried looking for examples etc but can only find ones of maps. I believe I have to make different tiles for the different levels.
Is there any examples or tutorials out there that could help me or is there a specific name for what I should be looking for.
The easiest way to do it is to use a tool called MapTiler.
It's free, and you just follow a really simple wizard that just hides all the complexity from the process.
Anyway, I've posted a tutorial exactly on this topic which you can check here.
I created a Java based version of a Google Map Tiler tool here:
https://github.com/devldevelopment/googlemaptiler
This will help you cut up images as per Map Tiler but is free. An example with Javascript is provided on the github readme.
Thanks

Sophisticated HTML5 Image Map?

I have an image of a living room, which I'm turning into a menu for a new site I'm working on. The idea is that you can click on certain items in the room, like a chair, desk, couch, etc and get taken to the desired page. I'm wondering if there is a clever way of doing this. Since the items are not simple shapes, I don't want to use a standard image map.
Thanks for you help!
I'm answering because a Google search brought me here...
Because you asked for a tool:
GIMP Has a really good Image map creation function.
Open your image in GIMP and select Filters > Web > ImageMap
From there you can create image maps by drawing on the image. Saving will generate HTML you can then tailor to your needs.
This tool looks to be a solid image mapper: http://www.image-maps.com/
I'd suggest doing this with a canvas and SVG's, it would make this quite a bit easier, and more professional.
As Korvin mentioned, doing this in SVG is probably the easiest option, because you can attach events to objects in SVG rather than having to manually specify a particular area in which to listen for events.
If you go this route, I recommend using the RaphaelJS library which has a nice syntax and the advantage of working in IE pre version 9. Here's a demo which, although it uses onmouseover instead of onclick, it might be close to what you're trying to achieve:
http://raphaeljs.com/australia.html

Creating custom GPS maps for WP7

So basically I am trying to create a custom GPS map for my WP7 application. I did find a great website with step by step instructions.
But in this example they used a program called OziExplorer. I tried to get this program and now i have 3versions of it. which are(I don't know which to use):
oziexplorer 3d
oziexplorer ce
oziexplorer pc
What i figured was that oziexplorer can only be used for windows pocket pc meaning winmo6.5 so i dont know if this is compatible with WP7.
I did find another website where an actual wp7 app has been released that allows a user to take a picture of a map and calibrate it with 2 points of location and the image can then be used as a gps map.
If anyone could possibly point me in the right direction as to how to begin creating a custom map to use in a wp7 app I would be ever so grateful. The map is supposed to be a map of a park.
Thanks in advance for everyones help and sorry if i sound like a noob..its just google has finally failed me..
Regards
shan
One approach I've seen for making map tiles is to use Microsoft MapCruncher - see http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/ and http://www.bdcc.co.uk/GoogleCrunch/Crunch.htm - this enables you to build custom tiles for an overlay.
This blog - http://dotnetbyexample.blogspot.com/2010/10/showing-open-source-maps-on-windows.html - tells you how to show custom tiles within the Bing Maps Silverlight viewer.
I would guess (don't know) that OziExplorer tiles could be used in this way - you just need to find a way to map the tile co-ordinates to a custom tile layer.
Another option for you is to use OpenStreetMap data:
You can use CloudMade's services - www.cloudmade.com - to produce map tiles with customised look-and-feel.
You can produce your own tiles using MapNik - but (as I'm sure you are already aware) the processing and storage size needed for map tiles is large

Resources