Creating Detached GMAP Event

UI Components for JSF
Post Reply
samkon
Posts: 4
Joined: 21 Feb 2014, 03:03

15 Apr 2014, 17:05

Hi everyone.

I'm using primefaces 3.4.2. Please take a look the screenshot below.

Image

Left side is gmap and the right side has list of markers called "Aktif Kullanıcılar". I want to create and overlaySelect event (openInfoWindow) when an item clicked on the right list. So I want to create an gmap event that is detached from <p:gmap> tag.

I've tried to use "PrimeFaces.widget.GMap" javascript library in various ways. But I could not get result. I used script below to get "marker id".

Code: Select all

<script type="text/javascript">
			function openInfoWindow(mid) {
				alert("marker id:" + mid);
				var myMap = new PrimeFaces.widget.GMap(document.getElementById("myMap"));
				var marker = myMap.getMarker(mid);
			}
		</script>
which gives me the alert of marker id as below screen shot.

Image

I started to think about to reload page when clicked then try to set window of clicked item open default which is an expensive way.

I want to get your opinions.

Best Regards

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests