Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9273217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:03:34+00:00 2026-06-18T16:03:34+00:00

I’m working with a google map api. This map was originally on the page

  • 0

I’m working with a google map api. This map was originally on the page with a marker. When the user clicked, the marker opened up with some details. Additionally, the user had the large map controls to zoom, etc. Lastly, the user could drag the maps viewable area.

What we’re trying turn it into is a map that:
1) Has the marker place on the map, but it’s no longer clickable.
2) Clicking on the map is now a hyperlink to a different map page.

Everything works, EXCEPT: when you mouse-over the map, the cursor looks like you should drag the map, not the finger you get when you mouse-over a link. If you mouse-over, you can still drag the map; however, as soon as you let go of the mouse, the link activates and you go to the new page.

How would I take this drag feature off and make the cursor look like a pointer?

Here’s my code:

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=MY KEY IS HERE"
      type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function load() {
      if (GBrowserIsCompatible()) {
         var map = new GMap2(document.getElementById("map"));    
//      map.addControl(new GLargeMapControl());
        //code to setup the map START
        //creating Geocoder object to get geolocation from an address
            geocoder.getLatLng("123 Main St, Boston, MA",
                function (point)
                {
                    map.setCenter(point,15);
                    map.addOverlay(createMarker(point,1));
                });         
        //code to setup the map STOP

        // Creates a marker at the given point with the given number label
function createMarker(point, number) {
  var marker = new GMarker(point);
  return marker;
}

      }
    }
//-->
</script>

And where I call the map in the html:

<a href="http://www.mysite.com">
    <div id="map" style="width: 298px;height:150px;"></div>
</a>

Thanks in advance as always.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:03:39+00:00Added an answer on June 18, 2026 at 4:03 pm

    With version 3 of the maps API, you can disable dragging on the map by passing in a map options object that has draggable: false in it.

    Here’s how you’d do it with the version 3 API:

    var mapOptions = {
        // add other options here as needed
        draggable: false
    }
    
    var map = new google.maps.Map(document.getElementById("map"),
                mapOptions);
    

    If you still want to do it with the soon to be deprecated version 2 API, this reference has some information on it. I’m not familiar with the version 2 API, but it looks like you just do this:

    var map = new GMap2(document.getElementById("map"));
    map.disableDragging(); 
    

    To change the cursors that are used, have a look at the GMapOptions class. You pass these options into the GMap2 constructor above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.