• Post Reply Bookmark Topic Watch Topic
  • New Topic

Primefaces 5 gmapInfoWindow position problem  RSS feed

 
Andreas Roerig
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have got a problem with gmap and the position of gmapInfoWindow position.
My map contains two overlays one marker and one circle. If the user clicks on the marker the InfoWindow ist shown on the correct location as expected. However if the user clicks on the circle the InfoWondow always shows up in the upper left corner of the map (see screenshot)


What I need is of course that the InfoWindow appears at the correct location of the circle.

Here is my code:



And here the code of my bean:



PrimeFaces version is 5.
What am I doing wrong?
Any help is highly appreciated.

Best regards
Andreas


 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PF5 is still pretty buggy. I'd suggest to make your own path here:
1. Capture the mouse cursor position when clicked (enclose the gmap in a div: <div onclick="savePosition(event.pageX,event.pageY);">).
2. Position and show your popup manually using the previously captured coordinates.
 
Andreas Roerig
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, thanks for the answer. But I found out the problem is not related to PF5 but also appears if I use the pure google js api v3.
Anyway I think I can bypass the issue by passing a marker with the same coordinates instead of the circle to the infoWindow.

Cheers
Andreas
 
Janaki Ram CHaganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Andreas,

I am facing the same problem that you described - the infoWindow always comes in the upper left corner. However I did not get the workaround that you suggested - passing a marker with the same coordinates instead of the circle to the infoWindow. Can you please elaborate?

Thanks,
Janaki
 
Janaki Ram CHaganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Andreas,

Please ignore my earlier post. I re-read and I followed it now. The info window comes up correctly for marker and does not come for circle.

Thanks,
Janaki
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!