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 {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.scrollable-box {
|
||||
|
@ -99,7 +99,7 @@ function mapPos(lat, lon) {
|
||||
|
||||
function onPlaceTap(feature, layer) {
|
||||
layer.on('click', function (e) {
|
||||
|
||||
openPlace(feature);
|
||||
});
|
||||
}
|
||||
|
||||
@ -117,8 +117,11 @@ function loadPlaces(lat, long) {
|
||||
});
|
||||
}
|
||||
|
||||
function openplace(osmid) {
|
||||
alert(osmid);
|
||||
function openPlace(feature) {
|
||||
$('#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) {
|
||||
layer.on('click', function (e) {
|
||||
|
||||
openPlace(feature);
|
||||
});
|
||||
}
|
||||
|
||||
@ -117,8 +117,11 @@ function loadPlaces(lat, long) {
|
||||
});
|
||||
}
|
||||
|
||||
function openplace(osmid) {
|
||||
alert(osmid);
|
||||
function openPlace(feature) {
|
||||
$('#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