views:

26

answers:

1

Hi I was working on customization of gmap infoWindow. I wrote the following code..

    <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAWFxfdA2Gu9LJMJw80x2tKhQhoncwM0SGfm1Opx_70t50wOiSWxRz3mt77PVPCsnMPENBxlx9FaX5AQ"&gt;&lt;/script&gt;
<script src="javascript/extinfowindow.js" type="text/javascript"></script>
<script type="text/javascript">



var gmarkers = [];
function createMarker(point,name,html,map) {

    var myIcon = new GIcon(G_DEFAULT_ICON);
    myIcon.image = "images/koodya_map_pointer.png";
    myIcon.iconSize = new GSize(22, 31);
    var markerOptions = { icon:myIcon };

    var marker = new GMarker(point,markerOptions);    

      GEvent.addListener(marker, 'click', function(){ 

        marker.openExtInfoWindow(
          map,
            "extInfoWindow_coolBlues",
            "<div>"+
                "<div style='width: 78px;float:left;border:1px red solid;padding:0px'><img src='http://earth.google.com/outreach/images/mymaps_custom_icons_ss.jpg' width='77px' height='50px'/></div>"+
                "<div style='width: 130px;float:right;border:1px red solid;padding:0px'>Description Description Description Description Description Description Description</div>"+
                "<div style='border:1px red solid;padding:0px'>option option option option </div>"+
            "</div>",
          {beakOffset:1}
        ); 

      });

    return marker;
  }

But in Error console it showing Error: marker.openExtInfoWindow is not a function Source File: http://localhost:8080/SearchEngine/list?ps=*&amp;pt=property_type%3A*&amp;loc=Kolkata Line: 72

can any1 tell me why marker.openExtInfoWindow is not recognised...??

A: 

I think what your looking for isn't openExtInfoWindow its marker.openInfoWindowHtml and you can populate that with your code above.

  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml("Some other stuff");
  });

Check these links they are really good for getting to grips with GoogleMaps

Info Markers Tutorial

Google Maps Tutorials

DeliveryNinja
No the function name is correct you can check it out from http://gmaps-utility-library-dev.googlecode.com/svn/trunk/extinfowindow/docs/examples.html I need to customizes the whole popup not only the Text
Kuntal Basu
Ok have you added the import to the ExtInfoWindow.js then?
DeliveryNinja
yes you can see the 2nd line <script src="javascript/extinfowindow.js" type="text/javascript"></script>
Kuntal Basu
Kuntal Basu
Sorry I looked at the error message and overlooked that line in the code. I'm posting from work so I'm doing it on the sly. Glad you got it sorted.
DeliveryNinja