日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

6、使用infowindow

發布時間:2023/12/20 windows 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 6、使用infowindow 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

ESRI公司提供的infowindow既美觀用實用,而且可定制性強,是時時獲取信息的好窗口,用好它可以使工作量大大的減少。

他的使用方法介紹如下:

1、 主要屬性

Property

Type

Description

anchor

String

Placement of the InfoWindow with respect to the graphic. See the Constants table for values.

Infowindow的顯示位置,具體請看其“常量“設置

coords

Point

The anchor point of the InfoWindow in screen coordinates.

信息窗口所在的坐標點

fixedAnchor

String

InfoWindow always show with the specified anchor. See the Constants table for values.

指定的顯示位置

isShowing

Boolean

Determines whether the InfoWindow is currently shown on the map.

判斷信息窗口的顯示狀態

2、 常量:

ANCHOR_LOWERLEFT

窗口位于點的左下

ANCHOR_LOWERRIGHT

InfoWindow is anchored to the lower right of the point. 右下

ANCHOR_UPPERLEFT

InfoWindow is anchored to the upper left of the point.左上

ANCHOR_UPPERRIGHT

InfoWindow is anchored to the upper right of the point.右上

3、 方法:

Method

Return Value

Description

hide()

none

隱藏信息窗口

move(point)

none

Moves the InfoWindow to the specified screen point.

移動信息框到指定點

resize(width, height)

none

Resizes the InfoWindow to the specified height and width in pixels.改變信息框大小

setContent(stringOrDOMNode)

InfoWindow

Sets the content in the InfoWindow.設置信息窗口的內容

setFixedAnchor(anchor)

none

Sets the fixed location of the InfoWindow anchor. Valid values are listed in the Constants table.設置顯示位置

Anchor參數為上面的常量類型

setTitle(title)

InfoWindow

Sets the title for the InfoWindow.

設置窗口的標題

show(point, anchor)

none

Shows the InfoWindow at the specified screen point and anchor. Valid values are listed in the Constants table.

顯示信息框(位置點,位置)

4、 事件:

onHide()

隱藏窗口時的事件

onShow()

顯示窗口時的事件

5、 使用實例:

function infowindow(evt) { map.infoWindow.setTitle("Coordinates"); map.infoWindow.setContent("lat/lon : " + evt.mapPoint.y + ", " + evt.mapPoint.x + "<br />screen x/y : " + evt.screenPoint.x + ", " + evt.screenPoint.y); map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)); } map.getInfoWindowAnchor(evt.screenPoint); //為獲取系統建議的顯示位置,這樣寫可以使窗口盡量顯示在屏幕中最佳位置!!

?

轉載于:https://www.cnblogs.com/dwf07223/archive/2013/04/27/3048095.html

總結

以上是生活随笔為你收集整理的6、使用infowindow的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。