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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:21:59+00:00 2026-05-11T07:21:59+00:00

I have this scenario, can anybody fill the gaps for me? Its like this:

  • 0

I have this scenario, can anybody fill the gaps for me? Its like this:

Database Table Maps’ fields:

Map_ID, Coordinates, MarkerTitle, MarkerField.

Code Behind:

Dim myTableAdapter As New myDatasetTableAdapters.tblMapsTableAdapters Dim myTable As myDataset.tblMapsDataTable = myTableAdapter.GetAllMaps() 

Right now, I am assigning one value at a time to be able to show one googleMap in my page, simply by having Friend Variables and in codebehind which gets their values on PageLoad and I declared variables with the same name in my script that shows the maps, its like:

Code Behind:

Friend coordinates As String Friend zoom As String Friend maptitle As String Friend text As String 

Script:

<script type='text/javascript'>   function load() {     var map = new GMap2(document.getElementById('map'));     var marker1 = new GMarker(new GLatLng(<%=coordinates%>));     var html1='<%=maptitle%><br/>' + '<%=text%>';     map.setCenter(new GLatLng(<%=coordinates%>), 5);     map.setMapType(G_HYBRID_MAP);     map.addOverlay(marker1);      map.addControl(new GLargeMapControl());     map.addControl(new GScaleControl());     map.addControl(new GMapTypeControl());     marker.openInfoWindowHtml(html1);   } </script> 

How can I go from the above procedure to something like: passing a whole tableOfMaps to the JavaScript or reading this data their (retrieving database information from within the JavaScript side) and then iterating like this:

For Each map In MapsTable { var marker1 = new GMarker(new GLatLng(<%=coordinates%>)); var html1='<%=maptitle%><br/>' + '<%=text%>'; map.addOverlay(marker1); marker.openInfoWindowHtml(html1); } 

I know this is too much to ask, so help will be deeply appreciated…

  • 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. 2026-05-11T07:21:59+00:00Added an answer on May 11, 2026 at 7:21 am

    I’m going to use jQuery to simplify things, hope that’s OK…

    Perform the database look-ups on the server-side, and emit data into the HTML. You should be looking to produce something like this:

    <div id='maps-table'>   <div class='map-entry'>     <span class='map-title'>Title 1</span>     <span class='map-text'>Text 1</span>     <span class='map-coordinates'>Coordinates 1</span>   </div>   <div class='map-entry'>     <span class='map-title'>Title 2</span>     <span class='map-text'>Text 2</span>     <span class='map-coordinates'>Coordinates 2</span>   </div>   ... </div> 

    If you’re using something like ASP.NET you can use an asp:Repeater.

    Once you have the data rendered in your HTML, you can query and iterate over it:

    $('#maps-table .map-entry').each(function() {    var title = $(this).find('.map-title').text();   var text = $(this).find('.map-text').text();   var coordinates = $(this).find('.map-coordinates').text();    // Add map markers here, eg:    var marker = new GMarker(new GLatLng(coordinates));   var html = title + '<br/>' + text;    map.addOverlay(marker);   marker.openInfoWindowHtml(html);  }); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There's no such thing as a null in .csv files.… May 11, 2026 at 11:24 am
  • added an answer You can't change the URL without navigating to that URL.… May 11, 2026 at 11:24 am
  • added an answer You can join to the inserted table to limit the… May 11, 2026 at 11:24 am

Related Questions

I have this scenario where I need data integrity in the physical database. For
I have this typical scenario. I have a smartclient application built on .net 2.0
This is a question for a WSS/SharePoint guru. Consider this scenario: I have an
I have a similar scenario as this one: public class TestLinq2Xml { private XElement
Scenario: I have a document I created using LaTeX (my resume in this case),
I have this code in jQuery, that I want to reimplement with the prototype
I have this idea for a free backup application. The largest problem I need
I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM
I have this line in a javascript block in a page: res = foo('<%=
I have this setup where in my development copy I can commit changes on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.