drag images onto a map - image

I need to implement a feature where images can be geotagged. I want to drag and drop images(one or more images can be selected from the list) onto the map. Then the selected images should be geo tagged automatically to the point where they are dropped.
Can someone give me an idea on how to work on this.
Thanks

Yes, you can do this with HTML and Javascript.
I would advice you to use the jquery libary.
What you do is render the map where you want to place an image(for this example new york city)
What you do is use jquery to make the image you want to drop of yourself at the statue of liberty 50% opacity and draggable.
Under the image you have an in the middle of the image as a "pointer" which is not opaque.
People drag the "dot" under the image to the desired location.
When it's released you take the offset x and y, calculate that to the relative time x and y to find the geolocation and then store everything via ajax.
That's kinda the basis you'll have to work on to accomplish this.
It's a fun project though, but a bit timeconsuming.

Related

How to create clickable html elements like div-s on a picture in Laravel?

I am pretty new to Laravel and I need to make a project using that framework. In that project I need to display an image in a loaded view and on that image I need to draw/display html elements like div-s for example. These elements need to be drawn using (x,y) coordinates taken from a database and also must be clickable.
The whole purpose of the project is so that people could click on elements that are drawn on the image and they could "reserve" a place for themselves. For example, imagine a company's representative reserving a spot on the exhibition floor at a conference.
How should I do it? I am a bit lost, but was thinking about using JavaScript. Here is an example image with elements on it.

Get Image clicked position on DIfferent Resolution when the coordinates will be changed on different devices

I have a responsive Image which is working on different mobile resolution.
I want to Ask you, when I clicked on image at any place like top-left, left-botton etc, I want to get its(image) position.Means On which position it is being clicked. I tried the following scenario While Implementation of my Source Code, I get a coordinate on particular place on which The image is clicked.
Problem: Each of Mobile device has different resolution, So, For the same scenario, the coordinate will be differed. I required the implementation like the place of clicked image should be same on every resolution.
please tell me how can I resolve my Issues, And which one is best technology, tell me if anyone has knowledge to resolve this.
There have been some previous posts that try to achieve what you want, the basic logic can be achieved by calculating ratio:
var xratio=225/420; // 420-mouse-x-coord divided by 420
var yratio=38/38; // mouse-y-coord/element height
var x=320*xratio;
var y=38*yratio;
Please see the following references:
How to convert click coordinates of different dimensions into 320 dimension size?
https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect

Grow Images on Hover like Google Images

Hey everyone, I am trying to accomplish something with images growing on hover like the fancy grow mouseover effect on google images.
Here is what I have:
http://www.1stbusinessneeds.com/tooltip/tooltip.html
The tooltip is offset and is based on the walter zorn tooltip. What's the best way to have the mouseover popup grow out just like google images (with the text), instead of following the mouse?
(I still need it done with the same tooltip - maybe overwrite it, but it must be present to pass the text and image, it's just the positioning and display method of it that I need help creating, any samples would be appreciated)
You might want to look at JQuery.
this might be a good start http://jsfiddle.net/ZwhEu/

Could you recommend an image carousel?

I have a .NET 2.0 web project. I need a simple image carousel. What I would prefer is the main image on the top, and a scrolling bar with smaller images on the bottom. When the user hovers over or clicks the smaller image, it would populate the larger image space.
If you know of anything like this, even 3rd party paid controls, please recommend them.
jQuery is the way to go here is the google search result:
http://www.google.com/search?aq=0&oq=jquery+image+car&sourceid=chrome&ie=UTF-8&q=jquery+image+carousel

Qt - Drawing a Rect/Frame out of a bigger Pixmap image

I've been banging my head about this seemingly easy task and I could really use some help.
I have a wide Image loaded in the gui (using the designer..) and I want to be able to draw only a portion of it, a rectangle.
I need to be able to change this rectangle position over the large image, in order to draw a different part of the larger image at will. In this process the rect must maintain its size.
Using the Ui::MainWindow object I'm able to access the label holding the image and a solution that involves using this option is preferred (in order to keep up with the rest of the code I've already written )
Any solution will be much appreciated :)
Thanks,
Itamar
I would definitely (for ease of use) just place an empty label as placeholder in Designer.
Then implement the paintEvent for this label (delegate it to your own method). You'll have also have to look into QPainter, QPixMap, etc... Should be doable based on these hints and the documentation.
If you want more, I suggest you provide a small code snippet to work upon.
If you want to do this more or less purely through designer, you could put a QScrollArea where you want the portion of the image to appear. If you set the scroll area's scrollbar policy to be never shown, you can then manually change what part is visible via the scroll area widget. However, this would probably be more complex that creating a derived widget and reimplementing the paint function.

Resources