JSFiddle - React, Tailwind, and code Playground
by Ramkumar Pillai
HTML
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<ui:composition template="/templates/_basicTemplate.xhtml">
<ui:define name="scripts">
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
navigator.geolocation.getCurrentPosition(function (position) {
$("#currentLong").val(position.coords.longitude);
$("#currentLati").val(position.coords.latitude);
var map = PF('gmap').getMap(), latlng = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
map.setCenter(latlng);
var marker = new google.maps.Marker({
position: latlng
});
marker.setMap(map);
},
function (error) {
alert(error.message);
}, {
enableHighAccuracy: true,
panControl: false,
zoomControl: false,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false,
rotateControl: false
});
});
</script>
</ui:define>
<ui:define name="content">
<pe:layoutPane position="center" resizable="true" closable="true" collapsible="true" styleClassContent="zero-padding">
<h:form styleClass="form-inline"...