google maps - GoogleMaps won't render in JSF -


i'm building simple webapp shows map googlemaps multiple markers loaded database... can't render...

i'm using jsf 2 , gmaps4jsf.

my page looks this:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"       xmlns:h="http://java.sun.com/jsf/html"       xmlns:f="http://java.sun.com/jsf/core"       xmlns:ui="http://java.sun.com/jsf/facelets"       xmlns:m="http://code.google.com/p/gmaps4jsf/">  [...] <m:map width="500px" latitude="10.1" longitude="10.1" height="500px" zoom="6" autoreshape="true">     <ui:repeat var="loc" value="#{locs}">         <m:marker latitude="#{loc.latitude}" longitude="#{loc.longitude}">             <m:htmlinformationwindow htmltext="#{loc.latitude}-#{loc.longitude}" />         </m:marker>     </ui:repeat> </m:map> [...] 

i copied code example supposed work... can't see map.

i have gmaps4jsf-core-3.0.0.jar on classpath, think don't have configure else... ideas?

edit: seems tags not being recognized. when click on "view source code" in browser gmaps tags not "translated", being shown wrote them in xhtml file.

if tags not being translated jar file in wrong place. avoiding webapp find it. how building it?

place the latest library jar in web application web-inf/lib folder.

your m:map has inside h:form tag.

due library version should include javascript code:

<script type="text/javascript"    src="https://maps.googleapis.com/maps/api/js?sensor=true"> </script>  

take @ simple example using gmaps4jsf2 library.

have got working basic configuration first?

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"         "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"       xmlns:ui="http://java.sun.com/jsf/facelets"       xmlns:h="http://java.sun.com/jsf/html"       xmlns:f="http://java.sun.com/jsf/core"       xmlns:m="http://code.google.com/p/gmaps4jsf/"> <ui:composition xmlns="http://www.w3.org/1999/xhtml"                 xmlns:ui="http://java.sun.com/jsf/facelets"                 template="/template/base-template.xhtml">     <ui:define name="js">         <script type="text/javascript"                 src="https://maps.googleapis.com/maps/api/js?sensor=true">         </script>     </ui:define>     <ui:define name="title">         new title     </ui:define>     <ui:define name="content">         <h1>simple map marker , infowindow</h1>          <h:form id="form">             <m:map width="500" height="450px" latitude="37.13" longitude="22.43" enablescrollwheelzoom="true">                 <m:marker>                     <m:htmlinformationwindow htmltext="this sparta, greece"/>                 </m:marker>             </m:map>         </h:form>     </ui:define> </ui:composition> </html> 

regards,


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -