Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problem with primerfaces gmap tag

Tags:

primefaces

I tried to use a simple gmap example to start to developt a webapp, but it doesn´t work for me.

I used the example prime movie-collector that I found on the web page. I only included this code <p:gmap center="41.381542, 2.122893" zoom="15" type="HYBRID" style="width:600px;height:400px" /> in 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 haven´t wrong libraries.

Another day, I tried to create my own example using a simple map, but I obtained the same output.

Thanks!

like image 478
migueloop Avatar asked Jan 30 '26 19:01

migueloop


1 Answers

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

The following must be in the head 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> for it to render in Chrome/Safari.

like image 177
Mark Avatar answered Feb 02 '26 15:02

Mark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!