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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:01:21+00:00 2026-06-11T04:01:21+00:00

I have this code http://jsfiddle.net/DanielMontenegro/7pdU4/3/ Now, supose that I want to put that map

  • 0

I have this code

http://jsfiddle.net/DanielMontenegro/7pdU4/3/

Now, supose that I want to put that map in a site to allow people to report some particular event through the geocoding service. I would like to ask how could I manage to get the address/coordinates of that event in a table, and gatherall the users reports into a single database.

  • 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-11T04:01:23+00:00Added an answer on June 11, 2026 at 4:01 am

    See below code and try it.

    I am using php static array you can connect your database and create array according your requirement. see the array below.

    <?php  $item = array('jaipur, rajasthan,india', 'udaipur, rajasthan,india'); ?>
    

    Below My Code Take a look.

    <html>
        <head>
            <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=AIzaSyDwFjOazEAe1MI7nHV6vUwkWytOp8LH2Zk" type="text/javascript"></script>
        </head>
        <body onload="initialize();">
        <?php  $item = array('jaipur, rajasthan,india', 'udaipur, rajasthan,india'); ?>
        <script>
        var map = null;
        var geocoder = null;
    
        function initialize() {
                if (GBrowserIsCompatible()) {
    
    
                        map = new GMap2(document.getElementById("map_canvas"));
                        var addresses = ["<?php echo implode ('","', $item); ?>"]
    
    
                        var geocoder = new GClientGeocoder();
                        //var addresses = ["A II Z, Ibn Battuta Mall, Sheikh Zayed Road, 5th Interchange, Jebel Ali Village, Dubai","A. Testoni,Dubai Festival City Mall, Ground Floor, Dubai", "Abdulla Hussain Khunji, The Dubai Mall,Downtown, Abu Dhabi"];
                        var curIndex = 0;
    
                        function showAddress() {
                          var _cur = addresses[curIndex];
                          geocoder.getLatLng(
                            _cur,
                            function(point) {
                              if (!point) {
                                //alert(_cur + " not found");
                                //map.setCenter(new GLatLng(0, 0), 6);
                                //map.setUIToDefault();
                              } else {
                                //console.log(_cur+":"+point);
                                //alert(_cur);
                                        var cafeIcon = new GIcon(G_DEFAULT_ICON);
    
                                        // Set up our GMarkerOptions object
                                        markerOptions = { icon:cafeIcon };
    
                                        map.setCenter(point, 6);
                                        var marker = new GMarker(point, markerOptions);
                                        map.addOverlay(marker);
    
                                        var sales = new Array();
                                        sales = _cur.split("|");
    
    
                                        //Add click event on push pin to open info window on click of the icon
                                        GEvent.addListener(marker, "click", function() {
                                                marker.openInfoWindowHtml("<p class='para1bold' style=\"font-weight: bold;\">Address <br /><span class='para1' style='font-weight:normal;'>" + sales[1] + "</span></p>");
                                        });
                                        //Provides map,satellite,hybrid and terrain views in the map along with zoom control
    
    
                                        map.setUIToDefault();
                              }
                              //do next after done
    
                              curIndex++;
    
                              if(curIndex<addresses.length)
                                showAddress();
                            }
                          );
                        }
                        showAddress();
           }  
        }
        </script>
        <div id="map_canvas" style="width:100%; height:750px;"></div>
      </body> 
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this javascript code that creates a slider: http://jsfiddle.net/samccone/ZMkkd/ Now, i want to
I have this code. http://jsfiddle.net/ozzy/YGhkW/ What I want to do is, to put the
I am have now this code: http://jsfiddle.net/DK67k/2/ In here is 2D tile map and
I have this code: http://jsfiddle.net/AH4As/3/ It works in the fiddle, but on my site,
I have this code: http://jsfiddle.net/J6vzU/1/ I want to dynamically display thumbnail of uploaded file
I have this code for file compares: http://jsfiddle.net/CrN6X/ Now it does what I need:
Here what I want to achieve: http://jsfiddle.net/LxwXc/3/ When I have this code in my
ok I have this small code http://jsfiddle.net/laupkram/yJtyD/ now its not really working. I had
I have this code : http://jsfiddle.net/VAkLn/6/ When i add a table : http://jsfiddle.net/VAkLn/7/ this
I have this code that I've edited: http://pastebin.com/vrqHek6S I've put in comments where I

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.