I am using masptraction library.And this is my code:

var marker = new Marker(point);

                                //marker.setIcon('/FMS/img/angle/' + 
iconFileName);
                                marker.setIcon('/FMS/img/' + iconFileName);
                                
marker.setShadowIcon('/FMS/img/arrows/transparent.gif', siz);
                                marker.setLabel(markerInfo);
                                marker.setInfoBubble(markerInfoHtml);

                                markerObjs.push(marker);
                                markerIds.push(parseInt(assetId));
                                map.addMarker(marker);
                                //GEvent.trigger(marker, "click");

                                var label = new ELabel(new 
LatLonPoint(parseFloat(posArray[1]),
parseFloat(posArray[0])), "Somewhere Or Other", "style1", new GSize
(-40,0), 60 );

                            map.addOverlay(label);

where style1 is:"width:32px;height:32px;border:1px solid blue;"

And i have included the elabel.js ,no error but the rectangle is not
coming marker is showing.In the elabel.js the following method is not
invoking.

 ELabel.prototype.initialize = function(map) {
          alert("Elable initialize");
        var div = document.createElement("div");
        div.style.position = "absolute";
        div.innerHTML = '<div class="' + this.classname + '">' +
this.html + '</div>' ;
        alert(div.outerHTML);
        map.getPane(G_MAP_FLOAT_SHADOW_PANE).appendChild(div);
        this.map_ = map;
        this.div_ = div;
        if (this.percentOpacity) {
          if(typeof(div.style.filter)=='string')
{div.style.filter='alpha(opacity:'+this.percentOpacity+')';}
          if(typeof(div.style.KHTMLOpacity)=='string')
{div.style.KHTMLOpacity=this.percentOpacity/100;}
          if(typeof(div.style.MozOpacity)=='string')
{div.style.MozOpacity=this.percentOpacity/100;}
          if(typeof(div.style.opacity)=='string')
{div.style.opacity=this.percentOpacity/100;}
        }
        if (this.overlap) {
          var z = GOverlay.getZIndex(this.point.lat());
          this.div_.style.zIndex = z;
        }
        if (this.hidden) {
          this.hide();
        }
      }

I have given an alert in it ,but its not printing.but the following
method is invoking.in the elabel.js
  function ELabel(point, html, classname, pixelOffset, percentOpacity,
overlap) {
        // Mandatory parameters
          alert(point);
        this.point = point;
        this.html = html;

        // Optional parameters
        this.classname = classname||"";
        this.pixelOffset = pixelOffset||new GSize(0,0);
        if (percentOpacity) {
          if(percentOpacity<0){percentOpacity=0;}
          if(percentOpacity>100){percentOpacity=100;}
        }
        this.percentOpacity = percentOpacity;
        this.overlap=overlap||false;
        this.hidden = false;
      }
and the point is printing also.Please explain

On May 6, 12:03 pm, Mike Williams <[email protected]> wrote:
> Wasn't it subbu who wrote:
>
>
>
> >check this url ,some thing like this
> >http://google-maps-api.googlegroups.com/web/rectangle.bmp?gsc=ESDrNQsAAA
> >ACfdxMaq-zHTTCqThY24fD
>
> You can do that with ELabels.
>
> You can either create each one as a single ELabel which would be more
> efficient, particularly of you're going to have a lot of them on the
> map. Or you can create each one as three ELabels, which would be easier
> to code if you need to change the text as the vehicle changes speed.
>
> The rectangle would simply be a <div> with something like
>    style="width:32px;height:32px;border:1px solid blue;"
>
> Hint: Create the ELabel contents as a <div> with a fixed size, and
> centre the stuff inside it. If you allow the size of the <div> to vary
> to fit the contents, then it's difficult to work out a suitable
> label.pixelOffset setting.
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to