Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to get geo position from browser

Santosin-OracleJan 2 2017 — edited Feb 7 2017

Hi All,

We are trying to get geo Position from browser using code snippet as given  below.

                  navigator.geolocation.getCurrentPosition(function(position) {

                    mapCenterLon = position.coords.longitude;

                    mapCenterLat = position.coords.latitude;

                    mapZoom = 10;

                   // We are setting map properties in this API.

                   setCenterAndZoom(map, mapCenterLon, mapCenterLat, mapZoom);

But chrome gives a warning as given below and do not take to required location.

getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS.

Any suggestions ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2017
Added on Jan 2 2017
2 comments
536 views