Framework7 Force Geolocate reload on page into view

Framwork 7 question again, but this is very generic and can be used on any page obviously.

I have a page that loads into the main view - the page has geolocate tag to run that function. Problem is it only runs first time I open the page, but not subsequent loads of that page when returning to it…

Can I force the load of this or any other tag/function when I go back to this page.

Same thing with data being bound to a page. Navigating away from the index and back to it “breaks” the binding of data on the page.

On screenshot you will see it just shows the tag. Maybe App connect is not running after getting to the page. Any ideas @patrick. You helped me with getting the initial working of it.

Normally geolocation value changes all the time as your location changes… so this should generally work.

Not sure why it shouldn’t with Framework7.

Do you have tried on a test page without Framework7?

Works without Framework7

Ek think FW7 keeps the already loaded pages in some sort of view cache, so it does not trigger any onload events again when returning to those pages after initial load.

I will just set 2 hidden input field values to the geolocate lat and long and then have the pin get it’s info from there instead of relying on a event to trigger. I have a fab button that the user can set his/her location via geolocate and then I pan to that location on map.

Reason why I cannot set this on the index page is, with first open of the app the user is asked for location before they did onboarding and even signed up. Not good for trusting the brand and app :). By having geolocate on my explore page it triggers first time, then I will populate the input fields and get my lat and long from there. User can search with autocomplate which updates the input fields and pans to new location and then press fab to recenter on current location.

You will also see how pixelated my profile pic on map is - that is why in seperate post I asked if we can have a class to target images in map with css. I guess that is not possible?

Think it should work :slight_smile: