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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:37:10+00:00 2026-06-13T14:37:10+00:00

I have one array with coordinates (lat, long)… This array has about 60-80 items…

  • 0

I have one array with coordinates (lat, long)…
This array has about 60-80 items…

In my foreach cycle there are…

...{
$lat = substr($xx[1],0,8);
$long = substr($xx[0],0,8);

?>

<script type="text/javascript">
// <![CDATA[
$(function() {

   var geocoder = new google.maps.Geocoder();

function geocodePosition(pos,pos2) {
  geocoder.geocode({
    latLng: new google.maps.LatLng(pos,pos2)
  }, function(responses) {
if (responses && responses.length > 0) {
   console.log(responses[0].formatted_address);
} else {
   console.log('Cannot determine address at this location.');
    }
  });
}
geocodePosition(<?php echo $lat ?>,<?php echo $long ?>);

}); 

// ]]>
</script>

<?php } ...

Geocoder geocodes at the most 5 coordinates, others come with output ‘Cannot determine address at this location.’

When I take some of those, which “could not be determined”, I use them manually (just 1 item = lat and long, not the whole array) it works.

So where’s the problem?

  • 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-13T14:37:11+00:00Added an answer on June 13, 2026 at 2:37 pm

    You cant request addresses too fast in a row (blocked by google), you need to use small setTimeout() between when doing it inside loop. Also note that you can request only 2500 addresses per day with basic api, with business over 100000 source from google.

    How to avoid google map geocode limit

    Setting timeout to simulate pause

    Geocode markers from PHP array

    Avoid geocode limit – js / html source

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

Sidebar

Related Questions

I have one array that is filled by mysql_query. Values that are in this
I have a for loop that loops over one array... for i=1:length(myArray) In this
I have a table containing multiple addresses, including their Lat/Long coordinates, and I want
I have an array of coordinates (latitude and longitude) in one .php script and
Suppose I have a simple multidimensional structure, like this one: somestr<-array(sample.int(2, 120, replace=TRUE), dim=c(4,5,6))
I have two arrays, one is a node-node-cost array [a_node,b_node,cost] which has 8000 entries
I have one array. I want that array to retain its value between function
lets say i have one array a = numpy.arange(8*6*3).reshape((8, 6, 3)) #and another: l
I want to implement singleten design pattern in iphone code I have one array.
I have one main array which is the returned data from a MySQL query

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.