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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:31:44+00:00 2026-05-28T20:31:44+00:00

One question linked an interesting example of mixing API v2 and v3! . Look

  • 0

One question linked an interesting example of mixing API v2 and v3!. Look at the code:

function initialize() {
  if (GBrowserIsCompatible()) {

    // Create and Center a Map
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());

    // bind a search control to the map, suppress result list
    map.addControl(new google.maps.LocalSearch(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)));
  }
}
GSearch.setOnLoadCallback(initialize);

The map is apparently in v2 but the code new google.maps.LocalSearch() is v3!

How is this possible?

Maybe it’s not really API v3. I thought it could be deprecated Local Search API that worked within API v2, but it is not: in this API the object is google.search.localSearch while here it is google.maps.localsearch … I’m totaly confused.

  • 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-28T20:31:45+00:00Added an answer on May 28, 2026 at 8:31 pm

    That example only uses v2, not v3 at all. The v2 API does optionally expose everything under google.maps (for example google.maps.GeoXml) – most people just use the ‘G’ naming though.

    There’s also a difference between google.search.LocalSearch (which lets you query Google for local search results) and google.maps.LocalSearch (which is a v2 control). Since both APIs are deprecated, I’d avoid both!

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

Sidebar

Related Questions

Recently I came across one interesting question on linked list. Sorted singly linked list
A question just came up about java generics. The example code is: public interface
This question is linked to this one How can I set the default of
This question is linked to my previous one ( posted as an anonymous user
i recently asked question which was closed down linked here. https://stackoverflow.com/questions/3827349/how-to-use-one-openid-across-multiple-domains-closed I did not
One question about protected constructor. I learnt that the protected constructor can be used
I have one question regarding domain account. I have one domain controller where all
I had posted one question earlier jQuery inconsistency in setting readonly attribute in IE-8
I have one question; In my ASP.NET MVC web application have to do certain
I am learning JPA and have one question: In which situations we need more

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.