google-maps-builder icon indicating copy to clipboard operation
google-maps-builder copied to clipboard

Fix: getCurrentPosition() and watchPosition() are deprecated on insecure origins

Open DevinWalker opened this issue 10 years ago • 5 comments

When you first install the plugin and create a map it will attempt to geolocate the admin user. When it does this it looks like there's a deprecation notice from Google that needs fixing:

getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

8-4-2015 3-40-09 pm

DevinWalker avatar Aug 04 '15 22:08 DevinWalker

After reading https://goo.gl/rStTGz I'm not certain this is super critical just yet. Researching more...

DevinWalker avatar Aug 04 '15 23:08 DevinWalker

any answer for this? I am also stuck for localhost everything works fine but not on server. Please anyone help!

nishantkumarverma avatar Sep 05 '15 04:09 nishantkumarverma

Do you have an SSL on your server?

DevinWalker avatar Sep 07 '15 01:09 DevinWalker

yes, its https

NkHAp avatar Nov 07 '15 08:11 NkHAp

@DevinWalker

I have gone through the research I and found that this is a warning and found only when site is HTTP and chrome browser version is > 50.

Found a likely answer in https://stackoverflow.com/questions/32106849/getcurrentposition-and-watchposition-are-deprecated-on-insecure-originsbasically . this feature will not be supported (in Chrome only?) in the future, but only for HTTP sites. HTTPS will still be ok.

Here I have one suggestion. We can show a admin notice on admin side for recommending make site https to avoid such warning. Please let me know your feedback.

Thanks.

nishitlangaliya avatar Aug 06 '18 09:08 nishitlangaliya