Giter Site home page Giter Site logo

Comments (39)

jstillwell avatar jstillwell commented on May 18, 2024 9

Nope, that is kind of the point though. Google has been, rightfully so, getting tight on security. This is just part things that will be changing. SSL is cheap and worth it.

Check out the link they provide for more info.

from leaflet-gps.

jstillwell avatar jstillwell commented on May 18, 2024 6

You are making it hard to be nice. No, in chrome there is no other way. Just read the warning. It says all you need to know. I will not be replying to this thread anymore. If you need clarification then you should consider a different occupation.

-----Original Message-----
From: "Zain-Ul-Abideen-1990" [email protected]
Sent: ‎5/‎9/‎2016 12:51 PM
To: "stefanocudini/leaflet-gps" [email protected]
Cc: "John Stillwell" [email protected]; "Mention" [email protected]
Subject: Re: [stefanocudini/leaflet-gps] warning: watchPosition() aredeprecated (#15)

ok and is there any alternative?

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

from leaflet-gps.

es6Test avatar es6Test commented on May 18, 2024 5

Why, what is the worst that can happen on http for this?

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024 4

ok and is there any alternative?

from leaflet-gps.

raselcse10 avatar raselcse10 commented on May 18, 2024 4

Google Chrome has deprecated this feature from version 50. Below 50 it will work . Now it will work only for HTTPS.

from leaflet-gps.

jstillwell avatar jstillwell commented on May 18, 2024 2

@es6Test the only threat I see is some kind of man in the middle attack. If someone is listening, and you are not using https then everything you do is sent in plain text. This would enable them to know your location.

from leaflet-gps.

IsraelDCastro avatar IsraelDCastro commented on May 18, 2024 2

I'm working in localhost, i read the geolocation would work fine if i work in localhost, but i hava an Error all the time: getCurrentPosition() and watchPosition() no longer work on insecure origins.

I need a solution, please help me

from leaflet-gps.

felipedspereira avatar felipedspereira commented on May 18, 2024 2

@IsraelDCastro you can use it with localhost. In chrome it still working

from leaflet-gps.

erbing avatar erbing commented on May 18, 2024 1

everything for safe

from leaflet-gps.

stefanocudini avatar stefanocudini commented on May 18, 2024 1

uoh then... unique solution is use HTTPS!!? DAMN!

Can I add a console.warn in the code for informing?

from leaflet-gps.

jstillwell avatar jstillwell commented on May 18, 2024

If you just have your site on HTTPS it will be fine. The error/warning only occurs when on an HTTP(insecure) site.

from leaflet-gps.

stefanocudini avatar stefanocudini commented on May 18, 2024

do you know any solution over plain HTTP?

from leaflet-gps.

gocanto avatar gocanto commented on May 18, 2024

so How can we get the user location through JS now? @jstillwell

from leaflet-gps.

stefanocudini avatar stefanocudini commented on May 18, 2024

everything fork is appreciated ^_^

from leaflet-gps.

gocanto avatar gocanto commented on May 18, 2024

of course.. But I just came across this conversations because I was browsing for a solution to that deprecate message. watchPosition() are deprecated

which also appear when doing regulare geolocation as so:

if (navigator.geolocation) {

                var vm = this;
                navigator.geolocation.getCurrentPosition(function(position)
                {
                    var geolocation = {
                        lat: position.coords.latitude,
                        lng: position.coords.longitude
                    };

                    var circle = new google.maps.Circle({
                        center: geolocation,
                        radius: position.coords.accuracy
                    });

                    vm.autocomplete.setBounds(circle.getBounds());
                });
            }

from leaflet-gps.

Kevincifuentes avatar Kevincifuentes commented on May 18, 2024

I have the same issue, I can't use getCurrentPosition in just HTTP web page. Any comments for solving this using HTTP would be really appreciated. Thanks in advance!

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

Same issue, any luck?

from leaflet-gps.

Kevincifuentes avatar Kevincifuentes commented on May 18, 2024

I just changed the web page to a https... don't know if there is another solution

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

Right but that's a worst case scenario will work when no hope. Is there any alternative?

from leaflet-gps.

jstillwell avatar jstillwell commented on May 18, 2024

I don't want to be mean but did you even read the explanation. You CANT do this without HTTPS. I just won't happen. The reason is that without HTTPS then others could steal your location. It's really very simple.

-----Original Message-----
From: "Zain-Ul-Abideen-1990" [email protected]
Sent: ‎5/‎9/‎2016 11:57 AM
To: "stefanocudini/leaflet-gps" [email protected]
Cc: "John Stillwell" [email protected]; "Mention" [email protected]
Subject: Re: [stefanocudini/leaflet-gps] warning: watchPosition() aredeprecated (#15)

Same issue, any luck?

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

from leaflet-gps.

stefanocudini avatar stefanocudini commented on May 18, 2024

Pull Request Please!
At this moment I don't have an Android device to do the tests

from leaflet-gps.

hiteshthakor avatar hiteshthakor commented on May 18, 2024

same error i am getting
console error

please help me i am stuck

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

Please use it with SSL then no issues.
here is the link: https://m.clratings.com/test.html

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

I did yesterday and it's been fine for me.

from leaflet-gps.

vicmonmena avatar vicmonmena commented on May 18, 2024

Hi!

Any alternative for development environment?

Thanks!

from leaflet-gps.

hiteshthakor avatar hiteshthakor commented on May 18, 2024

@Zain-Ul-Abideen-1990 i am not able to open above link

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

I have removed the file from the server but things works fine with HTTPS.

from leaflet-gps.

hiteshthakor avatar hiteshthakor commented on May 18, 2024

@Zain-Ul-Abideen-1990 it working fine with https but not with http

from leaflet-gps.

zain4bjs avatar zain4bjs commented on May 18, 2024

Yes, it works with https not http.

from leaflet-gps.

tvelf009 avatar tvelf009 commented on May 18, 2024

You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that you also need to include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.

For example
if use Windows, Click Start and run.

chrome --unsafely-treat-insecure-origin-as-secure="http://localhost:8100"  --user-data-dir=C:\testprofile

from leaflet-gps.

San-Jeevan avatar San-Jeevan commented on May 18, 2024

Its the latest chrome browser update that creates this issue.
Works fine in IE and Firefox. I think its time the people got rough with Googles attitude of screwing people over like this. I don't care if its security related. They should leave the http option open.
Even if its security related, governments like the american, british etc can just go to the CA of the certificate and ask for the private key so they can decrypt the encrypted traffic. Infact I think they have intergrated automatically retrieval of private keys from CAs in they surveillence tool.

From now on I am deleting chrome and going Firefox.

from leaflet-gps.

muhiddingithub avatar muhiddingithub commented on May 18, 2024

This work only HTTPS not HTTP, testing localhost only can by FireFox

from leaflet-gps.

coder-strange avatar coder-strange commented on May 18, 2024

In my case it is working with firefox but not with crome.

from leaflet-gps.

geosmiles avatar geosmiles commented on May 18, 2024

Is there a work around this yet?

from leaflet-gps.

stefanocudini avatar stefanocudini commented on May 18, 2024

you need use HTTPS in your local web server

from leaflet-gps.

IsraelDCastro avatar IsraelDCastro commented on May 18, 2024

Thanks, how can I get a Https local web?

from leaflet-gps.

NavruzJn avatar NavruzJn commented on May 18, 2024

Hi guys, so is there any solution to get current geo location withoud https?
Or can give me links How to switch https to https?

from leaflet-gps.

hmzaabasi avatar hmzaabasi commented on May 18, 2024

Hi guys, so is there any solution to get current geo location withoud https?
Or can give me links How to switch https to https?

The warning clearly states that it's not possible "[Deprecation] getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin,"

But if you still want HTTP then you can try this https://stackoverflow.com/a/37276372/8657746 -- not tested.

from leaflet-gps.

San-Jeevan avatar San-Jeevan commented on May 18, 2024

you can use ngrok for local testing.
otherwise letsencrypt is a free solution

from leaflet-gps.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.