Commit 67e72c46 authored by Ratnadeep Rajendra Kharade's avatar Ratnadeep Rajendra Kharade
Browse files

Added bike icons and logic to display bike icons

parent 3f537b5b
master 1-login-with-token-authentication 10-show-bikes-from-api-response-on-map 13-show-bike-details 14-api-integration-for-registration 15-find-the-street-name-by-geo-location-data 16-create-search-location-functionality 17-create-toast-message-service 18-design-feedback-page 18-design-feedback-page-2 19-registration-page-validation 20-ride-history 20-ride-history-2 21-reservation-history 22-hire-reserved-bike 24-routing-from-users-current-position-to-the-bike 25-current-bike-reservation-workflow 28-routing-from-bike-location-to-user-s-destination 34-navigation-menu-is-getting-displayed-on-login-page 36-cancel-hired-bike 37-display-username-on-homepage 38-display-calculated-name-of-the-street-on-reservation-and-hire-page 39-validation-on-login-page 4-reserve-a-bike 40-map-performance-improvement-map-angle-doesn-t-change-when-selected-3d 41-display-live-location-of-user-on-map 42-add-log-in-button-on-registration-page-add-extra-messages-for-email-and-password-validation 42-add-log-in-button-on-registration-page-add-extra-messages-for-email-and-password-validation-2 45-show-stepwise-navigation-instructions-on-my-ride-page 46-show-bicycle-route-between-bike-and-user-s-destination 47-show-alternate-routes-for-bike-to-destination 48-create-a-common-service-for-getting-user-s-current-location-and-live-location 49-show-loading-page 50-add-dependencies-locally-to-improve-app-performance 51-while-navigating-between-pages-map-doesn-t-load-properly 52-page-loader-is-getting-displayed-everywhere 53-scrollining-in-ride-history 53-scrollining-in-ride-history-2 55-change-password 56-create-dummy-page-or-menu-for-hotline-contact 57-registration-not-working-from-app 58-add-flow-on-navigate-button-to-route-from-user-to-bike 6-user-registration 60-create-common-theming-styles-and-colors 61-chnage-styles-for-bike-list-and-bug-fixes 62-change-in-feedback-workflow 63-password-reset-api-integration 64-close-button-on-home-page-to-redirect-to-bike-list 66-highlight-selected-route-from-list-of-different-routes 67-deactivate-user-api-integration 68-display-no-go-areas-on-map 69-add-launcher-icon-for-application-on-android 70-add-validation-for-feedback-should-not-be-empty 71-prediction-ui-implementation-send-location-of-bike-to-backend 72-feedback-toast-message 73-removal-here-maps-api-key Show-Bike-details-when-bike-icon-is-clicked prototype1 search_functionality
No related merge requests found
Showing with 126 additions and 0 deletions
+126 -0
......@@ -11,3 +11,22 @@
<ion-content>
<div #map style="width: 100%; height: 100%" id="mapContainer"></div>
</ion-content>
<ion-footer>
<div class="bike-list-container">
<ion-icon class="bike-list-expander" name="arrow-dropup-circle" (click)="expandBikeList()"></ion-icon>
<div class="bike-container" *ngFor="let i of tempArr">
<div class="bike-name">
Bike 1
</div>
<div class="battery-info">
<div><ion-icon class="battery-icon" name="battery-charging"></ion-icon></div>
<div>100%</div>
</div>
<div class="address-info">
<div class="disance">56m</div>
<div class="address">Schllingstrasse 129</div>
</div>
</div>
</div>
</ion-footer>
......@@ -2,3 +2,85 @@
max-height: 35vh;
overflow: hidden;
}
ion-footer{
overflow-y: auto;
padding-top: 30px;
}
.bike-list-container{
position: relative;
.bike-list-expander{
position: absolute;
font-size: 32px;
color: gray;
z-index: 200;
left: 46%;
top: -32px;
}
}
.bike-container{
height: 60px;
width: 100%;
border: 1px solid #aaaaaa;
border-radius: 5px;
box-sizing: border-box;
float: left;
width: 100%;
clear: both;
div {
height: inherit;
float: left;
}
}
.bike-name, .battery-info{
height: inherit;
line-height: 45px;
}
.battery-info{
width: 20%;
}
.bike-name{
width: 30%!important;
line-height: 60px;
padding-left: 10px;
}
.battery-info{
line-height: 60px;
div{
float: left;
}
}
.battery-icon{
font-size: 20px;
}
.address-info{
float: right!important;
width: 50%!important;
font-size: 14px;
text-align: right;
padding-right: 10px;
div{
width: 100%;
}
.disance{
height: 20px;
line-height: 20px;
}
.address{
height: 40px;
padding-top: 10px;
}
}
......@@ -11,6 +11,12 @@ export class HomePage {
private map: any;
private currentLocation = {lat:0,lng:0};
public tempArr = [1,2];
public locationArr = [{lat:48.778409, lng:9.179252},
{lat:48.780926, lng:9.173456},
{lat:48.775174, lng:9.175459},
{lat:48.793704, lng:9.191112}]
@ViewChild("map", { static: false })
public mapElement: ElementRef;
public constructor(private geolocation: Geolocation) {
......@@ -44,6 +50,10 @@ export class HomePage {
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map));
var ui = H.ui.UI.createDefault(this.map, defaultLayers);
this.getLocation(this.map);
var img = ['../../../assets/images/ic_high.png','../../../assets/images/ic_medium.png','../../../assets/images/ic_low.png'];
for(let i=0; i<this.locationArr.length; i++){
this.addMarker(this.locationArr[i].lat, this.locationArr[i].lng, img[i%2]);
}
}
getLocation(map) {
......@@ -75,4 +85,19 @@ export class HomePage {
map.addObject(marker);
map.setCenter({ lat: lat, lng: lng });
}
expandBikeList(){
for(let i=0; i<20; i++) {
this.tempArr.push(i+3);
}
}
addMarker(lat, lng, img){
var icon = new H.map.Icon(img);
// Create a marker using the previously instantiated icon:
var marker = new H.map.Marker({ lat: lat, lng: lng }, { icon: icon });
// Add the marker to the map:
this.map.addObject(marker);
}
}
src/assets/images/ic_high.png

2.67 KB

src/assets/images/ic_low.png

2.26 KB

src/assets/images/ic_medium.png

2.01 KB

src/assets/images/ic_position.png

11.4 KB

src/assets/images/vector.png

2.01 KB

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment