max3d
max3d

Reputation: 1507

primefaces 5.0 gmap widget error

I am using Primefaces v5.0 and encountered the error, - "Uncaught ReferenceError: mapWidget is not defined", while accessing p:gmap widget in javascript.

The js code snippet where the request to the widget "mapWidget" is made:

mapWidget.getMap().setCenter(latlng);

In PF4 all works okay. Is it the 5.0 bug or I am doing something wrong?

Upvotes: 0

Views: 319

Answers (1)

LarsBauer
LarsBauer

Reputation: 1545

According to PrimeFaces 5.0 documentation the following code fragment should work:

PF('yourWidgetVar').getMap().setCenter(latlng);

Upvotes: 1

Related Questions