uvhost.blogg.se

Ionic ios 11 status bar padding
Ionic ios 11 status bar padding









Now go ahead and add these 2 functions below the previous functions inside pages/home/home. This function will then automatically connect the different coordinates and draw the line, and finally after we have constructed this line we call setMap on this line which draws it onto our map! To actually draw we can use a Polyline which can have a few options and most important the path which expects an array of objects like Inside that function we also check a variable currentMapTrack which always holds a reference to the current path on our map!

IONIC IOS 11 STATUS BAR PADDING UPDATE

We can then use those values to first of all add a new entry to our trackedRoute array (to have a reference to all the coordinates of the walk) and then call the redrawPath if we want to immediately update our map. It only happens on app launch, If I change tab and change back the list is displayed correctly and it doesn’t happen again unless the app is force closed and reopened. I get this on iOS devices, roughly 40 of the time.

ionic ios 11 status bar padding

Inside the startTracking function we subscribe to the position of the user which means we automatically get new coordinates from the Observable! Statusbar-padding not applied on app launch. Watch the current GPS position of the userĪfter that we also need to add the tracked route to the storage, but that’s the easiest part of our app.Later this will be an array of objects, so let’s work on adding data to that array! Tracking Geolocation and Drawing on Google Map Right now, our app is also loading historic routes from the storage using loadHistoricRoutes but of course that’s still empty. You might have noticed that we also added declare var google at the top which prevents TypeScript errors later inside our code.









Ionic ios 11 status bar padding