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

  • Home
  • SEARCH
  • 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 4015646
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:38:40+00:00 2026-05-20T09:38:40+00:00

i am using google map v3 api i would like to show information bubble.

  • 0

i am using google map v3 api i would like to show information bubble. For example when i click the marker any marker the function will open the related bubble. On the other hand i would like to trigger all bubble with external link. I tink that marker, 'click', function should be each function. I’ve tried a lot of example but i didn’t work it.

Here is my test addres:
http://www.gercekustu.com/test/

Here is my code:

function getGoogleMap(Altitude, Latitude, Address) {
            //var myLatlng = new google.maps.LatLng(Altitude, Latitude, Address);
            var image = 'icon.png';

            var myOptions = {
                zoom: 10,
                center: new google.maps.LatLng(-33.9, 151.2),
                mapTypeId: google.maps.MapTypeId.ROADMAP
            }

            var map = new google.maps.Map(document.getElementById("googleMap"), myOptions);

            var locations = [
                ['Test içeriği5', -33.890542, 151.274856, 5],
                ['Test içeriği4', -33.923036, 151.259052, 4],
                ['Test içeriği3', -34.028249, 151.157507, 3],
                ['Test içeriği2', -33.80010128657071, 151.28747820854187, 2],
                ['Test içeriği1', -33.950198, 151.259302, 1]
            ];

            for (var i = 0; i < locations.length; i++) {
                //var image = new google.maps.MarkerImage('icon' + i + '.png',
                var image = new google.maps.MarkerImage('icon.png',
                new google.maps.Size(40, 34),
                new google.maps.Point(0, 0),
                new google.maps.Point(10, 34));

                var location = locations[i];
                //alert(location[3]);
                var myLatLng = new google.maps.LatLng(location[1], location[2]);
                var marker = new google.maps.Marker({
                    position: myLatLng,
                    map: map,
                    icon: image,
                    title: location[0],
                    zIndex: location[3]
                });

                var infowindow = new google.maps.InfoWindow({
                    content: location[0],
                    position: myLatLng
                });

                google.maps.event.addListener(marker, 'click', function () {
                    infowindow.open(map);
                });

            }
            infowindow.open(map);
        }

Thank you for your help

  • 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-05-20T09:38:40+00:00Added an answer on May 20, 2026 at 9:38 am

    I modified your code, this one works for me:-

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Google Map</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
    
        $(document).ready(function () {
            var map;
            var infowindow;
    
            getGoogleMap('41.033245', '29.110191', '<div class="mapContainer"><div class="mapContentLeft"><h1>Hotel Name <i>Information/Suggestion</i></h1><div>Hotel Image</div></div><div class="mapContentRight"><div class="mapHotelStars">*****</div><div class="mapHotelAdress">Hotel Adress</div><div class="mapHotelPrice"> Currency + Integer </div></div></div>');
    
            function getGoogleMap(Altitude, Latitude, Address) {
                var myOptions = {
                    zoom: 10,
                    center: new google.maps.LatLng(-33.9, 151.2),
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                }
    
                map = new google.maps.Map(document.getElementById("googleMap"), myOptions);
    
                infowindow = new google.maps.InfoWindow();
    
                google.maps.event.addListener(map, 'click', function() {
                    infowindow.close();
                });
    
                var locations = [
                    ['Test 5', -33.890542, 151.274856, 5],
                    ['Test 4', -33.923036, 151.259052, 4],
                    ['Test 3', -34.028249, 151.157507, 3],
                    ['Test 2', -33.80010128657071, 151.28747820854187, 2],
                    ['Test 1', -33.950198, 151.259302, 1]
                ];
    
                for (var i = 0; i < locations.length; i++) {
                    var location = locations[i];
                    var title = location[0];
                    var latitude = location[1];
                    var longitude = location[2];
                    displayMarker(title, latitude, longitude);
                }
            }
    
            function displayMarker(title, latitude, longitude) {
    
                var latlong = new google.maps.LatLng(latitude, longitude);
    
                map.setCenter(latlong);
    
                var marker = new google.maps.Marker({
                    map: map,
                    title: title,
                    icon: "icon.png",
                    position: latlong
                });
    
                google.maps.event.addListener(marker, 'click', function() {
                    infowindow.setContent(title);
                    infowindow.open(map, marker);
                });
            }
    
        });
    </script>
    <style type="text/css">
     .googleMapContainer {width:700px; height:500px;}
     .mapContainer {border:1px solid red;}
    </style>
    </head>
    <body>
        <form id="form1">
          <div class="googleMapContainer" id="googleMap"></div>
       </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Google Maps API (v2) and would like to center the map
I am using Google maps API version 3. I would like my double click
I'm using the Google Map API to retrieve city + state/region information from a
I would like to have a panel with a google map using google's javascript
I have a scenario where I am using Google Map JavaScript API to process
Is it possible to do a google map lookup using the google maps API
I'm using the Google Maps API to build a map full of markers, but
I'm using the Google Maps API v2. I add markers to the map and
I want to draw multiple circles on a map, using the Google Maps API
I am creating a map using the new(ish) v3 of the Google Maps API

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.