M
M
MamaLuyba2019-04-15 19:10:28
Geolocation
MamaLuyba, 2019-04-15 19:10:28

How to work with geolocation and where to store data?

Good evening.
I decided to practice for the sake of writing down several web applications (if they can be called that) and I had some questions:
1) Where to store user data without connecting to the server? Now I do it through localstorage, but I understand that this is not enough. Is it worth it to look at IndexedDB, or will it be necessary to connect the server sooner or later, because. Is it planned to store not only text (the application is like a notebook), but also a photo?
2) Is it possible to write data to a file on mobile phones? I planned to use this for text as an alternative to localstorage: and if everything is clear on the computer, then I still haven’t figured out the mobile ones - is it possible to create a file on the phone through a script, and then read data from it?
3) Is it really necessary to pervert with Yandex.maps / Google.maps and their policy of prohibiting the use of everything and everyone to use geolocation (getting an address by coordinates up to the house)? I tried to embed sites that allow you to get the address through an iframe, but, of course, this is blocked on them.
4) In the mobile version, for some reason, the :hover event fires only once. Let me explain: there is html:

<div list>
      <div chosen>Press me!</div>
      <div options>
        <div option>One</div>
        <div option>Two</div>
      </div>
    </div>

And there are styles:
div[options] {
  display: none;
}

div[list]:hover div[options] {
  display: block;
}

According to the logic and tutorials, each time you click on "Press me!" a block with options should appear, and by clicking on another area it should be hidden. And if in the examples on w3 this happens on my phone, then in my application it only works for the first time. Further, the block does not appear when clicked. CHADNT?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-04-16
@Zarom

1.2. Use any database https://www.google.com/amp/s/blog.trigent.com/five... But one way or another, you will need an additional server part later - for synchronization, for example.
3. Google and Yandex have api, free of charge in acceptable volumes.
4. https://stackoverflow.com/questions/10523395/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question