Place markers now open place page when tapped
This commit is contained in:
parent
b84421764a
commit
fedaefbd45
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -218,10 +218,10 @@ body {
|
|||||||
|
|
||||||
#buttons .circlebutton img {
|
#buttons .circlebutton img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 15px;
|
||||||
left: 5px;
|
left: 15px;
|
||||||
width: 50px;
|
width: 30px;
|
||||||
height: 50px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollable-box {
|
.scrollable-box {
|
||||||
|
@ -99,7 +99,7 @@ function mapPos(lat, lon) {
|
|||||||
|
|
||||||
function onPlaceTap(feature, layer) {
|
function onPlaceTap(feature, layer) {
|
||||||
layer.on('click', function (e) {
|
layer.on('click', function (e) {
|
||||||
|
openPlace(feature);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,8 +117,11 @@ function loadPlaces(lat, long) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openplace(osmid) {
|
function openPlace(feature) {
|
||||||
alert(osmid);
|
$('#main-content').load("screens/place.html", null, function () {
|
||||||
|
loadPlace(feature);
|
||||||
|
$('#overlay-main').css('display', 'block');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
9
platforms/android/assets/www/screens/place.html
Normal file
9
platforms/android/assets/www/screens/place.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<div class="scrollable-box">
|
||||||
|
<div class="h4" id="place-name"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function loadPlace(feature) {
|
||||||
|
$("#place-name").text(feature.properties.name);
|
||||||
|
}
|
||||||
|
</script>
|
@ -99,7 +99,7 @@ function mapPos(lat, lon) {
|
|||||||
|
|
||||||
function onPlaceTap(feature, layer) {
|
function onPlaceTap(feature, layer) {
|
||||||
layer.on('click', function (e) {
|
layer.on('click', function (e) {
|
||||||
|
openPlace(feature);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,8 +117,11 @@ function loadPlaces(lat, long) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openplace(osmid) {
|
function openPlace(feature) {
|
||||||
alert(osmid);
|
$('#main-content').load("screens/place.html", null, function () {
|
||||||
|
loadPlace(feature);
|
||||||
|
$('#overlay-main').css('display', 'block');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
9
www/screens/place.html
Normal file
9
www/screens/place.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<div class="scrollable-box">
|
||||||
|
<div class="h4" id="place-name"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function loadPlace(feature) {
|
||||||
|
$("#place-name").text(feature.properties.name);
|
||||||
|
}
|
||||||
|
</script>
|
Reference in New Issue
Block a user