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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:28:34+00:00 2026-06-15T15:28:34+00:00

I am creating a google map in order to display store locations of a

  • 0

I am creating a google map in order to display store locations of a brand across india…

i have stored the complete address, with latitude & longitude in my SQL server database…

here I am able to get the address from database and display in my web page, but i am stuck with, mapping the address on google map…

here i have kept a text box so that the user enters his state/city/any location name, and clicks search button, then i have to mark the corresponding store location on the map by a marker..

here’s my code for googgle map…

<script type="text/javascript">
    var infowindow = null;
    function initialize() {
        //var centerMap = new google.maps.LatLng(13.040547,80.230805);
        var centerMap = new google.maps.LatLng(12.264864, 77.937012);
        var myOptions = {
            zoom: 7,
            center: centerMap,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        var map = new google.maps.Map(document.getElementById("map"), myOptions);
        setMarkers(map, sites);
        infowindow = new google.maps.InfoWindow({ });
    }

    //var sites = '<%=TextBox1.Text%>'
    //alert(sites);
    //[
    //// ['Ambattur', 13.119438,80.148182, 4, 'Ambattur, Chennai, Tamil Nadu, India, 600031'],['Avadi', 13.124453,80.101662,   1, 'Avadi, Tamil Nadu, India, 600017'],  ['Jayanagar', 12.928945,77.590599, 1, 'Jayanagar, Bangalore, Karnataka, India,     560041'],['Indira Nagar', 12.973697,77.641325, 1, 'Indira Nagar, Bangalore, Karnataka, India, 560038'],['TamilNadu',     11.415418,78.662109, 1, 'TamilNadu, India, 600017']
    //];

    function setMarkers(map, markers) {
        for (var i = 0; i < markers.length; i++) {
            var sites = markers[i];
            var siteLatLng = new google.maps.LatLng(sites[1], sites[2]);
            var marker = new google.maps.Marker({
                position: siteLatLng,
                map: map,
                icon: new google.maps.MarkerImage(
                'Images/R.png ',
                null, null, new google.maps.Point(0, 42)),
                title: sites[0],
                zIndex: sites[3],
                html: sites[4]
            });

            google.maps.event.addListener(marker, "click", function () {
                infowindow.setContent(this.html);
                infowindow.open(map, this);
            });
        }
    }
</script>

here, i have sites variable, so that i can map my locations on a map,

but here i need to map them from database…

any help will be appreciated…

thanks
shameer ali shaik

  • 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-15T15:28:35+00:00Added an answer on June 15, 2026 at 3:28 pm

    Guruparan Giritharan..

    As i have told in my question, I want to locate stores across india.. & the sore details will be stored in database..
    Now, i am able to get the store details & mark their location on map by your code..
    earlier it is working fine for pincode, in the sense if you provide pincode in your searchbox, it will retrieve the corresponding
    store details..

    Now, as per my code, in my reply for your blog post, i am able to enter only string values in the textbox., here i need to implement it for numeric values(pincode) also,

    here’s my code of update panel and timer click event..

    protected void UpdatePanel1_Load(object sender, EventArgs e)
        {
            //Linq is used to load the table to the code
            DataClassesDataContext data = new DataClassesDataContext();
    
            //Select all from the table
            //List<addressmap> lst = (from u in data.addressmaps select u).ToList();
            List<addressmap> lst = (from u in data.addressmaps where u.StoreLocation == TxtSearch.Text || u.StoreCity == TxtSearch.Text || u.StoreState == TxtSearch.Text || u.StoreCountry == TxtSearch.Text select u).ToList();
    
    
            //add the table contents to the javascript array so that new locations will be loaded
            foreach (addressmap item in lst)
            {
                ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "infoarray", "'" + item.StoreAddress.ToString() + "'");
                ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "lonarray", item.StoreLongitude.ToString());
                ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "latarray", item.StoreLatitude.ToString());
                ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "bounce", item.StoreBounce.ToString());
            }
        }
    
        protected void Timer1_Tick(object sender, EventArgs e)
        {
            //update the update panel every 10 seconds
            UpdatePanel1.Update();
        }
    

    here in the select statement, i need for pincode also..

    any help will be thankful..

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

Sidebar

Related Questions

Creating a google map with store locations within 50 miles of user entered address.
I am busy with creating a Google map v3 site. If you have a
I'm creating a Google map mashup and am using SQL 2008. I will have
I want to populate a Google Map with markers from locations stored in a
I'm creating an asp.net page that uses the google map api. The page loads
I'm creating a map using Google Fusion Tables. It has several layers that are
I am creating a map using the new(ish) v3 of the Google Maps API
In google maps API v3, I'm creating my own custom map types by calling
I am working on creating a Google Chrome extension. We have it included in
I have successfully implemented code to plot multiple locations on google maps dynamically. Solution:

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.