Organization html
Jump to navigation
Jump to search
| Line 358: | Line 358: | ||
| − | <div id=" | + | <div id="map_container" style="height : 300px"></div> |
<input class="ci_form_input" type="hidden" placeholder="Coordinates" name="Form organization[Coordinates]" value=""> | <input class="ci_form_input" type="hidden" placeholder="Coordinates" name="Form organization[Coordinates]" value=""> | ||
| Line 488: | Line 488: | ||
function drawMap(lat,lon) { | function drawMap(lat,lon) { | ||
| − | var mapCenter = [lat,lon] | + | var mapCenter = [lat,lon]; |
| − | var map = L.map(' | + | var map = L.map('map_container', {center : mapCenter, zoom : 7}); |
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
| Line 530: | Line 530: | ||
$('#select_countries').on('change',function() { | $('#select_countries').on('change',function() { | ||
| − | var selected_country = $(this).find('option:selected | + | var selected_country = $(this).find('option:selected').text(); |
for(var i in obj) { | for(var i in obj) { | ||
if(obj[i].name == selected_country) { | if(obj[i].name == selected_country) { | ||
Revision as of 09:49, 7 March 2020