简体   繁体   English

Primefaces GMAP中的标签

[英]Labels in Primefaces GMAP

I have drown several polygons dynamically in a primefaces gmap which make administrative areas. 我在构成行政区域的primefaces gmap中动态淹没了多个多边形。 I need to label the polygons with the name of the area. 我需要用区域名称标记多边形。

Is there any way I can add labels for a polygon in primefaces gmap? 有什么方法可以在primefaces gmap中为多边形添加标签吗?

You can refer to Google Maps API documentation specifically about Inspect a polygon . 您可以参考Google Maps API文档中有关检查多边形的专门说明。

There is a sample that opens a window displaying the information you want (in your case, the name of the area) when a user clicks on the polygon. 有一个示例可以打开一个窗口,该窗口在用户单击多边形时显示所需的信息(在您的情况下为区域名称)。

You can view the working sample here 您可以在这里查看工作示例

This is a good kick start to achieve what you want. 这是实现您想要的目标的良好开端。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM