JQuery draggable google map
-
I have a div overlay with a gmap on it and have used a jquery plugin to make it draggable but when i try to use the pull and drag function on the map the whole div move. Any ideas how to fix this?
-
Answer:
Just wrap the google map in another div and assign it a handle, here is the code and a working example. HTML : <div class="draggable"> <div id="handle">Handle</div> <iframe width="700px" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=108+S+4th+St,+Cabot,+AR+72023,+USA&ie=UTF8&ll=34.983948,-92.014875&spn=0.012273,0.027122&z=14&iwloc=addr&om=1&output=embed&s=AARTsJrKwkyz-ofBV3q5yi6SmToKlUCe8Q" style="height: 522px"></iframe> </div> Javascript : $(document).ready(function() { $('.draggable').draggable({'handle' : '#handle'}); }); Example : http://jsfiddle.net/semTg/
user803447 at Stack Overflow Visit the source
Related Q & A:
- How to create map overlays on google map?Best solution by Quora
- How to add multiple polygons to a (Google) map?Best solution by Stack Overflow
- Why google map won't show mark to me?Best solution by Stack Overflow
- How to Display Big Data On A Google Map?Best solution by gis.stackexchange.com
- How is google earth better than google map?Best solution by news.softpedia.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.