Problem with primerfaces gmap tag

I tried using a simple gmap example to start developing webapp, but it does not work for me.

I used the example of the main movie collector that I found on the web page. I have included this code <p:gmap center="41.381542, 2.122893" zoom="15" type="HYBRID" style="width:600px;height:400px" />in the template.html file.

I got this error:

javax.servlet.ServletException: /template.xhtml @39,39 <p:gmap> Tag Library supports namespace: http://primefaces.prime.com.tr/ui, but no tag was defined for name: gmap
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)

I think that I am not mistaken in libraries.

The other day, I tried to create my own example using a simple map, but I got the same result.

Thank!

+3
source share
1 answer

Download the latest PrimeFaces jar. http://www.primefaces.org/downloads.html

The following should be indicated in the main section:

<script src="http://maps.google.com/maps/api/js?sensor=false"
        type="text/javascript" ></script>

<p:gmap>must be inside <f:view contentType="text/html"></f:view>to display it in Chrome / Safari.

+1
source

Source: https://habr.com/ru/post/1787739/


All Articles