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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:40:36+00:00 2026-05-26T20:40:36+00:00

Ok, I am working on a project where an end user will click on

  • 0

Ok, I am working on a project where an end user will click on a link within a grid that will open a new window. (.aspx page) I have been researching on how to create a google map from the newly opened .aspx page with out writing a bunch of dynamic javascript in the code behind and then registering the clientscript to the page. I have done this in the past but it really isn’t pretty and is really cumbersome if you ever need to come back and change things.

The initial version of this map will have a route with multiple points present, a later version of this will provide the ability to have multiple routes within the same map (just to give you an overview of what the end goal is) An example would be a route with points LA to Vegas to Austin.

So, I know this is a very general/vague question, but what I am trying to figure out is the best way to generate a google map from a .aspx page without writing dynamic sql, I am sure others have stumbled across this issue previously. Thoughts/Comments, everything is appreciated. Thanks.

  • 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-05-26T20:40:37+00:00Added an answer on May 26, 2026 at 8:40 pm

    There are some components floating around online, but one technique that’s worked well for me is to use a hidden field to hold the address/coordinates/etc., and use the hidden field to populate the map:

    <script type="text/javascript">
        var map = null; 
        var geocoder = null;                
        var address = "<%=hdnMapAddress.Value%>";       
    
        showAddress = function() {
            var mapContainer = $get("<%=pnlMap.ClientID%>");
            if (mapContainer){        
                if (GBrowserIsCompatible()){      
                    geocoder = new GClientGeocoder();                      
                    map = new GMap2(document.getElementById("<%=pnlMap.ClientID%>"));               
                }                    
                if (geocoder){ 
                    geocoder.getLatLng(address, 
                        function(point){                                                                
                            var marker = new GMarker(point);
                            if (marker){
                                map.setCenter(point, 12);                         
                                map.addOverlay(marker);                                                                                                                                                                                                                                                                                                                                               
                            }                                                              
                        }
                    );             
                }              
            }  
        }  
    </script>
    <asp:HiddenField ID="hdnMapAddress" runat="server" /> 
    <asp:Panel ID="pnlMap" runat="server" Height="230">
        <!-- map content -->
    </asp:Panel> 
    

    Code-behind:

    hdnMapAddress.Value = "123 Test St, Providence, RI 02904";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a vba project that has the end user copy/paste
I'm working on a project which will end up have a lot of application
I am working on a project that requires some image processing. The front end
I am working on a project that requires the use of user stories and
I'm working on a project where I need to generate end-user documentation for a
The project I'm working on allows an end-user to modify CSS code to integrate
I'm currently working on my project which consists of front and back-end written in
I am working a project that does not have a trunk / branches /
I'm working on project that lets users choose some scientific authors and columnists and
I am working on a project that uses WIX to install an application. One

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.