Organization html
Jump to navigation
Jump to search
Line 304: | Line 304: | ||
</div> | </div> | ||
+ | <!--------------------------MAPS--------------------------> | ||
+ | <input class="cultura_italiana_form_input" type="text" placeholder="Address" name="Form meeting[Address]" value=""> | ||
+ | |||
+ | |||
+ | <label for="latInput">Latitude</label> | ||
+ | <input id="latInput"/> | ||
+ | <label for="lngInput">Longitude</label> | ||
+ | <input id="lngInput"/> | ||
+ | <div id="map" style="height : 200px"></div> | ||
+ | |||
+ | <!-- | ||
+ | |||
+ | <link rel="stylesheet" href="https://culturaitaliana.org/w/en/leaflet.css"/> | ||
+ | <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> | ||
+ | |||
+ | <script src="https://culturaitaliana.org/w/en/leaflet.js"></script> | ||
+ | |||
+ | <div class="ci_form_section"> | ||
+ | <script> | ||
+ | var mapCenter = [22, 87]; | ||
+ | var map = L.map('map', {center : mapCenter, zoom : 3}); | ||
+ | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
+ | maxZoom: 18, | ||
+ | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + | ||
+ | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + | ||
+ | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', | ||
+ | id: 'examples.map-i875mjb7', | ||
+ | noWrap : true | ||
+ | }).addTo(map); | ||
+ | |||
+ | |||
+ | var marker = L.marker(mapCenter).addTo(map); | ||
+ | var updateMarker = function(lat, lng) { | ||
+ | marker | ||
+ | .setLatLng([lat, lng]) | ||
+ | .bindPopup("Your location : " + marker.getLatLng().toString()) | ||
+ | .openPopup(); | ||
+ | return false; | ||
+ | }; | ||
+ | |||
+ | |||
+ | map.on('click', function(e) { | ||
+ | $('#latInput').val(e.latlng.lat); | ||
+ | $('#lngInput').val(e.latlng.lng); | ||
+ | updateMarker(e.latlng.lat, e.latlng.lng); | ||
+ | }); | ||
+ | |||
+ | |||
+ | var updateMarkerByInputs = function() { | ||
+ | return updateMarker( $('#latInput').val() , $('#lngInput').val()); | ||
+ | } | ||
+ | $('#latInput').on('input', updateMarkerByInputs); | ||
+ | $('#lngInput').on('input', updateMarkerByInputs); | ||
+ | |||
+ | </script> | ||
+ | |||
<!--------------------------REGISTRATION DATE--------------------------> | <!--------------------------REGISTRATION DATE--------------------------> | ||
<div class="ci_form_section"> | <div class="ci_form_section"> |
Revision as of 15:09, 2 March 2020
Name
The name of the organization.
Logo
Type
The type of the organization.
Country
Where is the organization based?
City, town or village of the organization
Registration date
Registration ID
Official website