#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2004
    Posts
    965
    Rep Power
    11

    Google Maps marker text not appearing


    Hi,

    I have this Google Map code in which I want to display a simple pointer and text, but the text is not appearing.
    Any ideas why?

    Thanks.

    PHP Code:
    function initialize() {
      var 
    myLatlng = new google.maps.LatLng(48.893642.33739);
      var 
    mapOptions = {
        
    zoom13,
        
    centermyLatlng
      
    }
      var 
    map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);


        
      var 
    marker = new google.maps.Marker({
          
    positionmyLatlng,
          
    mapmap,
          
    title'Hello World!'
      
    });
    }

    google.maps.event.addDomListener(window'load'initialize);
    initialize(); 
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,905
    Rep Power
    3969
    The title option defines the text that shows in a tooltip when you hover over the marker. If you want a label to show along with the marker on the map then you need to use a plugin such as MarkerWithlabel to create your markers rather than the stock marker.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo