Comments (39)
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.
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.
Why, what is the worst that can happen on http for this?
from leaflet-gps.
ok and is there any alternative?
from leaflet-gps.
Google Chrome has deprecated this feature from version 50. Below 50 it will work . Now it will work only for HTTPS.
from leaflet-gps.
@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.
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.
@IsraelDCastro you can use it with localhost. In chrome it still working
from leaflet-gps.
everything for safe
from leaflet-gps.
uoh then... unique solution is use HTTPS!!? DAMN!
Can I add a console.warn in the code for informing?
from leaflet-gps.
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.
do you know any solution over plain HTTP?
from leaflet-gps.
so How can we get the user location through JS now? @jstillwell
from leaflet-gps.
everything fork is appreciated ^_^
from leaflet-gps.
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.
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.
Same issue, any luck?
from leaflet-gps.
I just changed the web page to a https... don't know if there is another solution
from leaflet-gps.
Right but that's a worst case scenario will work when no hope. Is there any alternative?
from leaflet-gps.
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.
Pull Request Please!
At this moment I don't have an Android device to do the tests
from leaflet-gps.
please help me i am stuck
from leaflet-gps.
Please use it with SSL then no issues.
here is the link: https://m.clratings.com/test.html
from leaflet-gps.
I did yesterday and it's been fine for me.
from leaflet-gps.
Hi!
Any alternative for development environment?
Thanks!
from leaflet-gps.
@Zain-Ul-Abideen-1990 i am not able to open above link
from leaflet-gps.
I have removed the file from the server but things works fine with HTTPS.
from leaflet-gps.
@Zain-Ul-Abideen-1990 it working fine with https but not with http
from leaflet-gps.
Yes, it works with https not http.
from leaflet-gps.
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.
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.
This work only HTTPS not HTTP, testing localhost only can by FireFox
from leaflet-gps.
In my case it is working with firefox but not with crome.
from leaflet-gps.
Is there a work around this yet?
from leaflet-gps.
you need use HTTPS in your local web server
from leaflet-gps.
Thanks, how can I get a Https local web?
from leaflet-gps.
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.
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.
you can use ngrok for local testing.
otherwise letsencrypt is a free solution
from leaflet-gps.
Related Issues (14)
- Have you tested it with leaflet 0.6.4?? HOT 1
- Update npm package
- Get marker coordinates HOT 1
- Leaflet 1.0 beta HOT 2
- Breadcrumbs via ployline or marker on map HOT 1
- leaflet-gps vs leaflet-realtime HOT 1
- locate loadingIcon spinner HOT 1
- [accessibility] Use `<button>` or `<a role="button">` HOT 1
- [accessibility] Make the gps-alert available to screen readers HOT 1
- making the js files linkable
- Error : Operation could not be completed(KCLErrorDomain error 0)
- radius = accuracy of point enhancement HOT 1
- Autoupdate marker position HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-gps.