Place markers now open place page when tapped

This commit is contained in:
Skylar Ittner 2016-03-31 15:15:00 -06:00
parent b84421764a
commit fedaefbd45
9 changed files with 34 additions and 10 deletions

View File

@ -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 {

View File

@ -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');
});
} }
/** /**

View 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>

View File

@ -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
View 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>