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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:28:41+00:00 2026-05-25T06:28:41+00:00

Using jQuery plugin gMap from http://gmap.nurtext.de/ . I can’t understand why the first (commented

  • 0

Using jQuery plugin gMap from http://gmap.nurtext.de/.

I can’t understand why the first (commented out) call works and shows the map correctly
but the second one (dynamically built) doesn’t work. The second one shows a map but with no markers and zoomed out all the way.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>GMap Test</title>
    <script src="/assets/js/jquery-1.6.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=My_API_Key"></script>
    <script type="text/javascript" src="/assets/js/jquery.gmap-1.1.0.js"></script>
    <script>
      $(document).ready(function(){
        /*       
        $("#course_map").gMap({controls: true,
                               scrollwheel: true,
                               markers: [{latitude: 44.5643,
                                          longitude:-88.1033,
                                          html: "Radisson/Oneida Casino<br />2040 Airport Drive<br />Green Bay, WI",
                                          icon: {image: "/images/gmap_pin_orange.png",
                                                 iconsize: [26, 46],
                                                 iconanchor: [12,46],
                                                 infowindowanchor: [12, 0]
                                                }
                                         },
                                         {latitude: 44.2674,
                                          longitude:-88.4383,
                                          html: "Radisson Paper Valley Hotel<br />333 W. College Avenue<br />Appleton, WI",
                                          icon: {image: "/images/gmap_pin_orange.png",
                                                 iconsize: [26, 46],
                                                 iconanchor: [12,46],
                                                 infowindowanchor: [12, 0]
                                                }
                                         }
                                         ],
                               zoom: 8
                              }
                             );
        */

        var markers = 'markers: [{latitude: 44.5643, '+
                      '           longitude:-88.1033, '+
                      '           html: "Radisson/Oneida Casino<br />2040 Airport Drive<br />Green Bay, WI", '+
                      '           icon: {image: "/images/gmap_pin_orange.png", iconsize: [26, 46], '+
                      '                  iconanchor: [12,46], '+
                      '                  infowindowanchor: [12, 0] '+
                      '                 } '+
                      '          }, '+
                      '          {latitude: 44.2674,  '+
                      '           longitude:-88.4383,  '+
                      '           html: "Radisson Paper Valley Hotel<br />333 W. College Avenue<br />Appleton, WI",  '+
                      '           icon: {image: "/images/gmap_pin_orange.png", iconsize: [26, 46], '+
                      '                  iconanchor: [12,46], '+
                      '                  infowindowanchor: [12, 0] '+
                      '                 } '+
                      '          },';
        markers = markers.slice(0, -1);
        markers =       '{controls: true, scrollwheel: true, ' + markers + '], zoom: 8}';
        $("#course_map").gMap(markers);                  

      });                            
    </script>
  </head>
  <body>
    <div id="course_map" style="height:297px; width:380px;border: 2px solid #666;"></div>
  </body>
</html>

Can anyone help out here?

  • 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-25T06:28:42+00:00Added an answer on May 25, 2026 at 6:28 am

    I am building the markers in a success function from an ajax call like this:

    success: function(data) {
      var markers = { controls: true, scrollwheel: true, markers: [], zoom: 8 };
      $.each(data["events"], function(id, event) {
        // .. do other stuff with the data
        if(showmap) {
          // add location to maps list prevent multiples
          marker1 = { latitude: event['LocLatitude'],
                      longitude:event['LocLongitude'],
                      html: '"'+event['LocName']+'<br />'+event['LocAddress']+'<br />'+event['LocCity']+', '+event['LocState']+'"',
                      icon:{image: "/images/gmap_pin_orange.png",
                            iconsize: [26, 46],
                            iconanchor: [12,46],
                            infowindowanchor: [12, 0]
                           }
                    };
          markers.markers.push(marker1);
        } // if(showmap)
      } // $.each(data["events"]
    }, // success:
    

    and then call it like this:

    $("#course_map").gMap(markers);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the jquery validation plugin from: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ How can I add a
I have a problem , i'm using jQuery plugin from http://www.stilbuero.de/jquery/tabs/ , plugin for
I using jquery form plugin from malsup http://jquery.malsup.com/form/ In the http://jquery.malsup.com/form/#getting-started example, how do
I am using jquery lightbox plugin colorbox ( http://colorpowered.com/colorbox/ ) and i want to
I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I am using the jQuery plugin from the jQuery build of TinyMCE. This simplified
I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have
1) I have a site, using jQuery and the gMap Google Maps plugin. This
I have been using jquery validate plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/ . It has been working successfully,
I am using jQuery Validation Plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) I have wrote following rule jQuery.validator.addMethod(valueNotEquals, function(value,

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.