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 3627938
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:57:08+00:00 2026-05-18T23:57:08+00:00

with google maps API v2 we can maximize the infowindow by specifying maxTitle property.

  • 0

with google maps API v2 we can maximize the infowindow by specifying maxTitle property. Can anyone show me how we can maximize the infowindow with v3 of google map api.

Thanks

  • 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-18T23:57:09+00:00Added an answer on May 18, 2026 at 11:57 pm

    I do not think there is yet an official way in version 3 to maximise Google Maps info windows as you could with version 2.

    However you can acheive something similar, see code below. I am sorry my example code isn’t very generic – if you require multiple markers you will need to re-write my code to use arrays or object literals or something.

    <!DOCTYPE html>
    <html>
    <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Google Maps JavaScript API v3 Example: Info Window Simple</title>
    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
      var contentString1 =
       "<a onclick=\"expand();\">+ Expand</a>";
    
      var contentString2 =
        "<div>" +
        "<a onclick=\"collapse();\">- Collapse</a>" +
        "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque consequat lacinia mi, sit amet aliquam sem interdum a. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus sed accumsan augue. Vivamus egestas nibh vel nulla mattis ut pulvinar tortor interdum. Quisque scelerisque, urna non vehicula porta, mi leo pellentesque arcu, non ullamcorper metus quam quis diam. Etiam quis nisl id tellus dictum semper at non mi. Praesent vel justo sed nisl cursus accumsan eu eget sem. Donec id lacus augue, nec vehicula metus. Maecenas varius ligula et orci mattis rhoncus. In interdum neque eu libero lobortis ac tristique metus fermentum. In eu turpis sit amet augue laoreet imperdiet.</p>" +
        "<p>Fusce molestie, nulla sit amet condimentum facilisis, augue elit tincidunt nisl, sit amet fermentum tellus tortor non sem. Etiam turpis lectus, fermentum ut congue vitae, gravida eget magna. Sed tristique, lacus a tincidunt faucibus, augue nulla aliquet ipsum, sagittis imperdiet nunc elit ac massa. Aliquam rutrum, urna quis accumsan suscipit, lectus massa rutrum velit, eget dignissim nisl orci a risus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec faucibus semper metus sit amet adipiscing. Donec consequat, est quis lacinia porta, eros magna tempor orci, ac suscipit sem justo vel enim. Suspendisse mauris nulla, pulvinar ac placerat vel, dignissim in tortor. Nunc arcu sapien, placerat id scelerisque porta, placerat vel neque. Morbi ut magna at risus varius interdum vitae ut lectus. Maecenas luctus rutrum augue. Phasellus facilisis, dui at ornare faucibus, mi magna iaculis nunc, in faucibus diam turpis vel sapien. Duis ac orci augue, vitae vehicula mauris. Curabitur sodales sem in lectus euismod tempus.</p>" +
        "<p>Suspendisse sagittis consectetur velit ut vulputate. Nullam ante odio, posuere sit amet dignissim vel, mollis eget nunc. Quisque fringilla tempus rutrum. Aenean hendrerit blandit ipsum, a blandit est volutpat sed. Etiam auctor erat ac nulla pellentesque vestibulum. Pellentesque congue justo ac massa aliquam vitae convallis velit condimentum. Ut aliquam posuere feugiat. In convallis vulputate tortor, nec ultrices enim ultrices non. Donec laoreet nibh at quam varius gravida. Donec massa nibh, cursus vel blandit sit amet, ultrices et turpis. Pellentesque adipiscing porta lorem, sit amet mollis augue posuere et. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque eget tortor mauris. Praesent eu pulvinar tortor. Proin eleifend interdum massa, at ultrices ligula viverra a. In auctor velit lorem. Quisque et massa quis lacus cursus fringilla. Maecenas ut convallis lectus. In ac erat vestibulum enim porttitor scelerisque in quis lacus. Cras quis diam mauris. </p>" +
        "</div>";
    
      var infowindow;
      var map;
      var marker;
    
      function initialize() {
        var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
        var myOptions = {
          zoom: 4,
          center: myLatlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        }
    
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    
    
        infowindow = new google.maps.InfoWindow({
            content: contentString1
        });
    
        marker = new google.maps.Marker({
            position: myLatlng,
            map: map,
            title: 'Test'
        });
    
        google.maps.event.addListener(marker, 'click', function() {
          infowindow.open(map,marker);
        });
    
        google.maps.event.addListener(infowindow, 'click', function() {
          infowindow.open(map,marker);
        });
    
    
      }
    
      function expand(){
        infowindow.close();
        infowindow.setContent(contentString2);
        infowindow.open(map, marker);
      }
    
      function collapse(){
        infowindow.setContent(contentString1);
      }
    
    </script>
    </head>
    <body onload="initialize()">
      <div id="map_canvas"></div>
    </body>
    
    </html>
    

    I hope this helps!

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

Sidebar

Related Questions

How can I use Google Maps API to show me a full screen map
In the Google Maps API v3, the InfoWindow can be attached to an anchor
I'm using google maps api to have a map show up on my website
Using the Google Maps API, how can I get the latitude and longitude of
As title, I searched official google maps api reference and other site, I can't
In google maps API v3, I'm creating my own custom map types by calling
I'm using the Google Maps API v2. I add markers to the map and
I'm using the Google Maps API to build a map full of markers, but
Where in the Google Maps API docs can I find a table explaining the
Using the google maps API (v3) I can successfully add an array of markers

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.