GOOGLE API中对GInfoWindowOptions的说明中有一句:“此类不存在构造函数。但是,此类可以实例化为 javascript 对象常量。"
请达人解释,我该怎么用,带例子最好,谢谢!

解决方案 »

  1.   

    GInfoWindowOptions does not have a constructor, so you cannot create actual GInfoWindowOptions objects, but you can create objects which are indistinguishable from them. You use a GInfoWindowOptions object by creating an object literal with the appropriate properties. See this page for the properties you can use http://www.google.com/apis/maps/documentation/reference.html#GInfoWindowOptions 
    When you open an info window, e.g. er.openInfoWindowHtml("Some <b>text</b> to show", {maxWidth:400}); The object literal "{maxWdith:400}" is used as a GInfoWindowOptions object. It not necessary to have an actual GInfoWindowOptions object because of duck typing, which says, if it walks like a duck, and talks like a duck, it's a duck. The object literal behaves identically to a GInfoWindowOptions object, so it is indistinguishable from the real thing. 我E文不是很好,怕误导你,就不帮你翻译了。
    希望这些资料能帮上你的忙。