Advertisement
henikseptiana15

Untitled

Jul 29th, 2021
1,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.31 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4. xmlns:ui="http://java.sun.com/jsf/facelets"
  5. xmlns:f="http://java.sun.com/jsf/core"
  6. xmlns:h="http://java.sun.com/jsf/html"
  7. xmlns:p="http://primefaces.org/ui"
  8. xmlns:j="http://jleaf.org/faces"
  9. xmlns:jl="http://java.sun.com/jsf/composite/jlcomponents">
  10. <ui:composition template="/WEB-INF/layouts/browse.xhtml">
  11.  <ui:define name="headPart">
  12.        <j:lang id="lang" prefix="org.jleaf.erp.master.web" />
  13.        <title>#{piece['viewGPS']}</title>
  14.        
  15.        <style type="text/css">
  16.             /* Set the size of the div element that contains the map */
  17.             #map {
  18.               height: 400px;
  19.               /* The height is 400 pixels */
  20.               width: 100%;
  21.               /* The width is the width of the web page */
  22.             }              
  23.        </style>
  24.        <script>
  25.        function initMap() {
  26.            const map = new google.maps.Map(document.getElementById("map"), {
  27.              zoom: 4,
  28.              center: #{viewGPSController.getLatLngCenter()},
  29.              mapTypeId: "terrain",
  30.            });
  31.            const visitResultGpsCoordinates = #{viewGPSController.buildLatLngVisitResultGps()};
  32.            const visitResultGpsPath = new google.maps.Polyline({
  33.              path: visitResultGpsCoordinates,
  34.              geodesic: true,
  35.              strokeColor: "#FF0000",
  36.              strokeOpacity: 1.0,
  37.              strokeWeight: 2,
  38.            });
  39.            visitResultGpsPath.setMap(map);
  40.          }
  41.         </script>
  42.  
  43.  </ui:define>
  44.  <ui:define name="pageTitle">
  45.       <span>#{piece['viewGPS']}</span>
  46.  </ui:define>
  47.  <ui:define name="filter">
  48.     <j:authorize task="viewGPS">
  49.         <input type="hidden" value="#{viewGPSController}" />
  50.             <p:messages id="messages" autoUpdate="true" />
  51.             <h:panelGrid columns="2" id="panelSearch">
  52.                 <h:outputText value="#{piece['date']}" />              
  53.                 <jl:datePicker value="#{filterBean.data['date']}"
  54.                     id="date" required="true" />
  55.  
  56.                 <h:outputText value="#{piece['salesman']}" />
  57.                 <jl:autoComplete comboName="salesman"
  58.                     id="autoCompleteSalesman"
  59.                     value="#{filterBean.data['salesmanAutoComplete']}"
  60.                     args="Y"
  61.                     itemLabel="#{not empty item['code'] and not empty item['name'] ? item['code'].concat(' - ').concat(item['name']): ''}"
  62.                     label="code, name"
  63.                     styleClass="md" />
  64.  
  65.                 <h:outputText />
  66.                 <p:commandButton id="searchButton" value="#{piece['search']}"
  67.                     actionListener="#{viewGPSController.doSearch()}"
  68.                     icon="ui-icon ui-icon-search"
  69.                     update=":rootform" />
  70.  
  71.             </h:panelGrid>
  72.             <p:defaultCommand target="searchButton"/>
  73.     </j:authorize>
  74.  </ui:define>
  75.  
  76.  <ui:define name="content">
  77.     <j:authorize task="viewGPS" forbidden="true">
  78.         <h:panelGrid id="mapPanel" width="100%">
  79.             <h3>Google Maps For Tracking Salesman (Ranger)</h3>
  80.             <!--The div element for the map -->
  81.             <div id="map"></div>
  82.        
  83.             <!-- Async script executes immediately and must be after any DOM elements used in callback. -->
  84.             <script async="async" defer="defer"
  85.                 type="text/javascript"
  86.                 src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDHOXjZVF9XrwSemKIBRRFupqm6zYEU8K8&amp;callback=initMap&amp;libraries=&amp;v=weekly&amp;channel=2"></script>
  87.         </h:panelGrid>
  88.     </j:authorize>
  89.  </ui:define>
  90. </ui:composition>
  91. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement