I think you need add a title as marker option.

var marker = new google.maps.Marker({
      position: myLatlng,
      map: map,
      title:"Hello World!"
  });
Regards

El 19/02/2013, a las 10:33, Mid Night <mid...@gmail.com> escribió:

> Hi,
> 
> 
> I've got a map with two markers and I want to display a label with each 
> marker.  Everything 
> is as expected, except that the labels do not appear.  Been struggling with 
> this for two days 
> now and would really appreciate a pointer in the right direction...
> 
> Here's the code:
> 
> <code>
> 
> function initialize() {
>     var mapLatlng = new google.maps.LatLng(51.2143689094, 1.5404999256);
>       var mapOptions = { center: mapLatlng,
>         zoom: 13, 
>         mapTypeId: google.maps.MapTypeId.SATELLITE };
>       var map = new google.maps.Map(document.getElementById("karte"), 
> mapOptions);
>       var bounds = new google.maps.LatLngBounds();
>       var latLng0= new google.maps.LatLng(51.9068430293818,4.48724985122681);
>       bounds.extend(latLng0);
>       map.fitBounds(bounds);
>       var img0 = "http://localhost/img/ico/button2_green.png";;
>       var marker0 = new google.maps.Marker({
>         position: latLng0,
>         map: map,
>         icon: img0});
>                     
>       var mapLabel0 = new MapLabel('Abfahrt Rotterdam', 
>         new google.maps.LatLng(51.9068430293818,4.48724985122681), {
>           map: map,
>           fontSize: 12});
>       mapLabel0.set('position', new 
> google.maps.LatLng(51.9068430293818,4.48724985122681));
>  
>       var latLng1= new google.maps.LatLng(50.8830689215046,-1.39556407928467);
>     bounds.extend(latLng1);
>     map.fitBounds(bounds);
>     var img1 = "http://localhost/img/ico/button2_red.png";;
>     var marker1 = new google.maps.Marker({
>         position: latLng1,
>         map: map,
>         icon: img1});
>     var mapLabel1 = new MapLabel('Ankunft Southampton', 
>         new google.maps.LatLng(50.8830689215046,-1.39556407928467), {
>         map: map,
>         fontSize: 12});
>     mapLabel1.set('position', new 
> google.maps.LatLng(50.8830689215046,-1.39556407928467));
>                         
>     var routeCoordinates = [ new google.maps.LatLng(51.9068430293818, 
> 4.48724985122681), 
>         new google.maps.LatLng(51.9023418373856, 4.47349548339844),
>         ...,
>         new google.maps.LatLng(50.8830689215046, -1.39556407928467)
>         ];
>     var cruiseRoute = new google.maps.Polyline({
>         path: routeCoordinates,
>         strokeColor: "#FFFFFF",
>         strokeOpacity: 1.0,
>         strokeWeight: 2
>         });
>             
>     cruiseRoute.setMap(map);
>     
> </code>
> 
> The javascript is generated via php.  I've taken the example above from the 
> "view source" of 
> Firefox.  The routeCoordinates have been manually trimmed as it is not 
> relevant to the problem. 
> As said, everything appears to work fine with the exception of the labels - 
> they do not appear on the map.
> 
> Naturally I'd be happy to provide further information, if requested.
> 
> 
> Tia
> MK
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google Maps JavaScript API v3" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-maps-js-api-v3+unsubscr...@googlegroups.com.
> To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
> Visit this group at 
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to