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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:15:25+00:00 2026-05-26T16:15:25+00:00

I have this code : <script src=http://maps.google.com/maps/api/js?sensor=false&libraries=geometry type=text/javascript></script> <script type=text/javascript> var VettoreIndirizziStruttura = new

  • 0

I have this code :

<script src="http://maps.google.com/maps/api/js?sensor=false&libraries=geometry" type="text/javascript"></script> 

<script type="text/javascript">
    var VettoreIndirizziStruttura = new Array();
    VettoreIndirizziStruttura.push("via ronchi 67 Foppolo Italia");
    VettoreIndirizziStruttura.push("piazza vittorio veneto 3 Carona Italia");
    VettoreIndirizziStruttura.push("via bianchi 22 Carona Italia");
    VettoreIndirizziStruttura.push("via san rocco 8 Branzi Italia");
    VettoreIndirizziStruttura.push("via cortivo 9 Foppolo Italia");
    VettoreIndirizziStruttura.push("via sponda 1 Valleve Italia");
    VettoreIndirizziStruttura.push("piazza umberto I° 23 Branzi Italia");
    VettoreIndirizziStruttura.push("via piave 2 Foppolo Italia");
    VettoreIndirizziStruttura.push("via arale San Simone Italia");
    VettoreIndirizziStruttura.push("via ronchi 53/61 Foppolo Italia");
    VettoreIndirizziStruttura.push("via tegia 5 Valleve Italia");
    VettoreIndirizziStruttura.push("via ronchi 81 Foppolo Italia"); 

    geocoder = new google.maps.Geocoder();  

    var index=0;
    elaboraCoordinate(index);
    function elaboraCoordinate(index) {
        geocoder.geocode({ address: VettoreIndirizziStruttura[index] }, function(results, status) {
            CoordinateStruttura = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng());

            console.log(index + " - " + VettoreIndirizziStruttura[index] + " - " + CoordinateStruttura);
            index++;
            if(index<VettoreIndirizziStruttura.length)
                elaboraCoordinate(index);
        });                
    }
</script>

the last geocoder fail. I get this error : Uncaught TypeError: Cannot read property ‘0’ of null. What am I wrong?

  • 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-26T16:15:26+00:00Added an answer on May 26, 2026 at 4:15 pm

    Everything is OK – you got this error because of no results.
    You should add following check:

    geocoder.geocode({ address: VettoreIndirizziStruttura[index] }, function(results, status) {
        if ( status == google.maps.GeocoderStatus.OK ) { ... }
    });
    

    You can handle other statuses – here is reference.

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

Sidebar

Related Questions

I have this java code: <script src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(jquery, 1.2.6); $(a#more).click(function() { $(#info_box).show(blind,
So I have a URL like: http://maps.googleapis.com/maps/api/geocode/json?&sensor=false&address=1330+SW%203rd%20Ave,%20Portland,%20OR But it returns just JSON. Im looking
i have copied this code from the FB.init documentation : <script src=http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US type=text/javascript></script> ...
I have written down the following code: var url = http://maps.googleapis.com/maps/api/geocode/json?latlng=+position.coords.latitude+,+position.coords.longitude+&sensor=false&callback=parseMe; console.log('URL is --
I have this code to show a map using the Virtual Earth API: <script
I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
I have tryed to run this code in my console: script/plugin install git://github.com/apotonick/cells.git ...but
i'm checking out some newbie Google Maps API tutorial code. They have an example
I have this code: <script type=text/javascript> var url = http://www.xxxxx.xxx/xxxxxxxxx; var txt; var id1;
I have this code in userpage.php: <script langauge=JavaScript><!-- function newWindow(fileName,windowName) { msgWindow=window.open(fileName,windowName); } //--></script>

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.