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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:23:30+00:00 2026-06-10T13:23:30+00:00

I created a while loop that produces multiple predefined circles on Google Maps. Each

  • 0

I created a while loop that produces multiple predefined circles on Google Maps. Each circle is a different circle based on other predefined information. My problem is that when I create a key/value pair in citymap it won’t pass through when I create the actual circle. Google debugger returns with Uncaught SyntaxError: Unexpected token ILLEGAL wherever the colors is written. Here is the code.

This part is in a while loop.

  citymap["<?php echo ${'location_' . $e};?>"] = {
    center: new google.maps.LatLng(<?php echo ${'coordinates_' . $e};?>),
    population: <?php echo ${'radius_' . $e}; ?>,
    colors : <?php echo $color; ?>       
  };

And here is the code that constructs the circles.

    for (var city in citymap) {
      // Construct the circle for each value in a location.
      var populationOptions = 
      {
        strokeColor: citymap[city].colors,
        strokeOpacity: 0.8,
        strokeWeight: 2,
        fillColor: citymap[city].colors,
        fillOpacity: 0.35,
        map: map,
        center: citymap[city].center,
        radius: citymap[city].population
      };
      cityCircle = new google.maps.Circle(populationOptions);
    }   
  • 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-10T13:23:32+00:00Added an answer on June 10, 2026 at 1:23 pm

    The error is probably caused by the PHP part. View page source and see the js code produced by PHP and make sure that it is a valid JS array and doesn’t have any syntax errors etc.

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

Sidebar

Related Questions

I created a while loop that produces five images. I then designed the images
I created a while loop that produces random images for the user. Every time
I have created a while loop that selects random images from from my server
Can you create a line of code, within a while-loop, that will create a
I have created this function to check abecedarian with while loop (A word is
A while back I created a lightbox plugin using jQuery that would load a
I am trying to construct an sql query using a while loop that increments
I have created a while loop while($row = mysql_fetch_Array($result)) { echo '<tr class=record> <td></td><td>'
I have created a while-loop in which temporary strings are created (string is updated
So I have an array that gets created from a php loop that looks

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.