Buying Google Maps and jQuery Help

Discussion in 'Programming' started by epikpoker, May 17, 2010.

  1. #1
    Hi,

    I am working on a google maps project using

    http://googlemaps.mayzes.org/

    and I have ran into an issue, I need to be able to open a markers info window on click, something like:

    
    function myclick(i) {
    $.googleMaps.gMap.trigger(marker[i], 'click'); 
    }
    
    Code (markup):
    and a link like:

    <a href="javascript:myclick(1)">TEST</a>
    Code (markup):
    When I try this I get "marker" undefined.

    $10 to the first person that can help me. (via paypal, I pay fees)
     
    epikpoker, May 17, 2010 IP
  2. Epiic

    Epiic Greenhorn

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I went to your site and did some searching. This might help.

    http://marcgrabanski.com/article/jquery-google-maps-tutorial-basics

    
    <!--
    // setup 10 random points
    var bounds = map.getBounds();
    var southWest = bounds.getSouthWest();
    var northEast = bounds.getNorthEast();
    var lngSpan = northEast.lng() - southWest.lng();
    var latSpan = northEast.lat() - southWest.lat();
    var markers = [];
    for (var i = 0; i < 10; i++) {
    	var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
            southWest.lng() + lngSpan * Math.random());
    	marker = new GMarker(point);
    	map.addOverlay(marker);
    	markers[i] = marker;
    }-->
    
    Code (markup):

    
    <!--
    $(markers).each(function(i,marker){
    	GEvent.addListener(marker, "click", function(){
                    //DO SOMETHING HERE?
    	});
    });
    -->
    
    Code (markup):
     
    Epiic, May 18, 2010 IP
  3. epikpoker

    epikpoker Well-Known Member

    Messages:
    213
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    This other site isnt using the same jquery library I am, I need a fix for this specific library.
     
    epikpoker, May 18, 2010 IP