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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:23:24+00:00 2026-06-17T12:23:24+00:00

I would like to acheive the exact same result rendered from a google maps

  • 0

I would like to acheive the exact same result rendered from a google maps url "http://maps.google.co.in/maps?q=canara+bank&hl=en&sll=12.953997,77.63094&sspn=1.069318,1.234589&hq=canara+bank&t=m&z=10" using the google maps API.

I’ve tried using the geoCode API, but some have been unable to achieve a similar result.

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
   html {
          height: 100%
   }

   body {
      height: 100%;
      margin: 0;
      padding: 0
   }

  #map_canvas {
      height: 100%
   }
 </style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDjW1WmSDPUaziJY6DtwMtRLhsGrzy7YLA&sensor=false">
</script>
<script type="text/javascript">

function getLocation()
{
if (navigator.geolocation)
{
    navigator.geolocation.getCurrentPosition(populateData,showError);
}
else{alert("Geolocation is not supported by this browser.");}
}

function showError(error)
  {
  switch(error.code) 
    {
    case error.PERMISSION_DENIED:
     alert("User denied the request for Geolocation.");
      break;
    case error.POSITION_UNAVAILABLE:
      alert("Location information is unavailable.");
      break;
    case error.TIMEOUT:
      alert("The request to get user location timed out.");
      break;
    case error.UNKNOWN_ERROR:
      alert("An unknown error occurred.");
      break;
    }
  }

function populateData(position)
{

   var geocoder = new google.maps.Geocoder();
   var address = "canara bank";

    geocoder.geocode( {
                        'address': "canara bank"                        
                    }, function(results, status) {

    if (status == google.maps.GeocoderStatus.OK) {
        var latitude = results[0].geometry.location.lat() ;
        var longitude = results[0].geometry.location.lng();

       var mapOptions = {
                     //display the map center from the user location
                     center: new google.maps.LatLng(position.coords.latitude,position.coords.longitude),
                     zoom: 9,
                     zoomControl:true,
                     zoomControlOptions: {
                     style:google.maps.ZoomControlStyle.SMALL
                     },
             mapTypeId: google.maps.MapTypeId.ROADMAP
            };
           var map = new google.maps.Map(document.getElementById("map_canvas"),
            mapOptions);


     var marker = new google.maps.Marker({    
             position: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()),    
             map: map    
            });

//for placing the markers
    var markers;
    var i;      
    for(i=0;i<results.length;i++){
        markers = new google.maps.Marker({    
            position: new google.maps.LatLng(results[i].geometry.location.lat(), results[i].geometry.location.lng()),    
            map: map,
           });
     }

     var circleOptions = new google.maps.Circle({
                  center: new google.maps.LatLng(latitude, longitude),
                  radius: 2000,
                  strokeColor: "#FF0000",
                  strokeOpacity: 0.5,
                  strokeWeight: 2,
                  fillColor: "#FF0000",
                  fillOpacity: 0.35,
                  map: map
                });       

    }
} );

}

</script>

</head>
<body onload="getLocation()">

<div id="map_canvas" style="width: 100%; height: 50%"></div>
<form name="form_simple" action=" " method="get">
    <center>
        <label id="d1"> map test</label>
    </center>
</form>

I would also like to know if there is an sll(parameter in the google maps to specify lat and lng ) alternative while using the geocode API.

Thanks in advance.

  • 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-17T12:23:24+00:00Added an answer on June 17, 2026 at 12:23 pm

    “Canara Bank” is not an address. The geocoding API converts addresses to coordinates (from the documentation):

    Geocoding is the process of converting addresses (like “1600 Amphitheatre Parkway, Mountain View, CA”) into
    geographic coordinates (like latitude 37.423021 and longitude -122.083739)

    You want the Places API:

    The Google Places API is a service that returns information about Places — defined within this API as
    establishments, geographic locations, or prominent points of interest

    Example

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

Sidebar

Related Questions

I would like to achive the same functinoanlity in the UITextField control as Google
I'm building a tutorialsystem with codeigniter and would like to achieve the following URL
I would like to understand the exact hierarchy of a block diagram. If a
My question is same exact issue like this SO question . Assume we have
I would like to achieve something very similar to Microsoft Access query designer -
I would like to achieve the following: I want a free Application Lifecycle Management
I would like to achieve the following: On homepage load, display modal box Within
I would like to achieve something similar to how scala defines Map as both
I would like to achieve this functionality. <p:column> <p:commandLink value=prihlasit oncomplete=dlg.show(); action=#{signForProjectBean.setProjectForDetail(item)} /> </p:column>
I would like to achieve the following, I need to generate report for multiple

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.