0

I have requirement of displaying an address on a click of a button, for which i got the latitude and longitude of the desired location,

while mapping in URl https://maps.google.com/?ll=28.64036031970850,77.24250191970849

like this. I don't get the desire pointer on google map Like which we get A in red pointer. Thanks for any assistance.

Abhishek gupta
  • 463
  • 3
  • 12
  • 33

2 Answers2

1

Try this. Change the lat/long as per your need. https://maps.google.com/?q=22.917923,72.773438

Naresh
  • 87
  • 4
  • 16
0

You can use custom markers for this. Here is a snippet to get you started:

// Create the map
var map = new google.maps.Map($("#map-result"), mapOptions);

// Create the marker on the map
var marker = new CustomMarker(new google.maps.LatLng(pinLatitude, pinLongitude), map, searchResults[i], markerNumber);

// Add listener to react to click of marker
google.maps.event.addListener(marker, 'click', (function (marker, i) {
    return function () {
        // Call some function to do something
        showSelectedMarker();
    }
})(marker, i));

A very good example is here:

Google Maps JS API v3 - Simple Multiple Marker Example

Community
  • 1
  • 1
J.T. Taylor
  • 4,147
  • 1
  • 23
  • 23
  • Sir i want to redirect to the google map. instead of showing in my website. so i just want to pass the url which locate my specified address. – Abhishek gupta Mar 21 '13 at 06:12