Advertisement
Guest User

Map Trigger button

a guest
Apr 30th, 2017
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Created by Junjie Cheng on 2017.04.02
  4. Copyright © 2017 Junjie Cheng. All rights reserved.
  5. -->
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  7. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml"
  9. xmlns:h="http://java.sun.com/jsf/html"
  10. xmlns:ui="http://java.sun.com/jsf/facelets"
  11. xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
  12. xmlns:p="http://primefaces.org/ui">
  13.  
  14. <ui:composition template="/template/siteTemplate.xhtml">
  15. <ui:define name="title">
  16. <h:outputText value="Map of Locations"></h:outputText>
  17. </ui:define>
  18.  
  19. <ui:define name="editableContent">
  20. <script src="http://maps.google.com/maps/api/js?key=AIzaSyAqLkL7YFuRRHD8523bGyZ4vgW0kqkqpvo" type="text/javascript" ></script>
  21. <h:form>
  22. <p:gmap id="gmap" center="#{mapView.getMapCenter()}" zoom="13" type="HYBRID" model="#{mapView.advancedModel}" style="width:100%;height:800px">
  23.  
  24. <p:ajax event="overlaySelect" listener="#{mapView.onMarkerSelect}" />
  25.  
  26. <p:gmapInfoWindow id="infoWindow">
  27. <h:panelGroup id="display">
  28. <h:outputLabel value="Location Name:" for="locationName" style="font-weight:bold" />
  29. &nbsp;
  30. <a href="AddressListContainer.xhtml" target="_blank">
  31. <h:outputLabel id="locationName" value="#{mapView.marker.title.replace('_', ' ')}" />
  32. </a>
  33. &nbsp;
  34. <c:if test="#{accountManager.isLoggedIn() == true}">
  35. <c:if test="#{triggerManager.userLocationIsTriggered(accountManager.selected) == false}">
  36. <h:outputLabel value="Trigger Emergency" for="trigger" style="font-weight: bold" />
  37. &nbsp;
  38. <a href="Trigger.xhtml">Trigger Emergency</a>
  39. </c:if>
  40. </c:if>
  41.  
  42.  
  43. <c:if test="#{LocationManager.selected.isTriggered()}" >
  44. <br/>
  45. <h:outputLabel for="locationDescription" value="Description:" style="font-weight:bold"/>
  46. &nbsp;
  47. <h:outputLabel id="locationDescription" value="#{mapView.data}" />
  48. </c:if>
  49. </h:panelGroup>
  50. </p:gmapInfoWindow>
  51. </p:gmap>
  52.  
  53. </h:form>
  54. </ui:define>
  55.  
  56. </ui:composition>
  57.  
  58. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement