GEOLOCATING NOT WORKING after Safari iOS 10.0.2

522 views
Skip to first unread message

Thoern

unread,
Oct 20, 2016, 5:09:25 AM10/20/16
to Google Maps JavaScript API v3
I have a webapp which uses javascript V3 api.
After upgrading to ios 10.02 it does not help to change security settings for Safari to allow positioning in integrety settings.

What I´ve heard Safari stoped allowing geolocation from a page that is not in SSL (Sequre protocol). (Same in Chromes latest release?)

How the heck do I transform my Googlemap webapp to a SSL?  simple way? this cauce me alot of headache. :-(

Are there costs involved using sequre protocols? 

Barry Hunter

unread,
Oct 20, 2016, 5:54:46 AM10/20/16
to google-maps-js-api-v3

How the heck do I transform my Googlemap webapp to a SSL?

The main thing is probably to contact your hosting company, about getting SSL enabled your hosting account and domain. 

THe Maps API supports SSL pretty well


Are there costs involved using [secure] protocols? 

In general no, particully since advent of https://letsencrypt.org/

... but hosting company MAY charge you more. For example may need to upgrade to a different package to get SSL support. Or they may change an 'setup' fee for getting to work etc. 
 


Or cloudflare.com offere SSL support for free. That can be an 'upgrade' path. 

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-maps-js-api-v3+unsub...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at https://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.

Thoern

unread,
Oct 20, 2016, 6:29:23 AM10/20/16
to Google Maps JavaScript API v3
Thanks for info! This must be a pretty big problem around, suddenly you can't position your self in a map without HTTPS, 

I think its ridiculous and a wast of many peoples time. 

Maby there is some workaround some other browser to be used on iphones that support Geolocation on a regular http

 




Den torsdag 20 oktober 2016 kl. 11:54:46 UTC+2 skrev barryhunter:

How the heck do I transform my Googlemap webapp to a SSL?

The main thing is probably to contact your hosting company, about getting SSL enabled your hosting account and domain. 

THe Maps API supports SSL pretty well


Are there costs involved using [secure] protocols? 

In general no, particully since advent of https://letsencrypt.org/

... but hosting company MAY charge you more. For example may need to upgrade to a different package to get SSL support. Or they may change an 'setup' fee for getting to work etc. 
 


Or cloudflare.com offere SSL support for free. That can be an 'upgrade' path. 

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-maps-js-api-v3+unsub...@googlegroups.com.
To post to this group, send email to google-map...@googlegroups.com.

Thoern

unread,
Oct 27, 2016, 7:03:34 AM10/27/16
to Google Maps JavaScript API v3
Hello, 
Moved the Googlemap file to a HTTPS 

next problem was I get "mixed contents".
I figured I have to point the V3 script src to HTTPS aswell and also for all of my fusion tables further down the road.

Anyhow I run into a problem with the V3 src for HTTPS

my original HTTP src was: 
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.7&sensor=false"></script>

and I find the new one should be something like 
<script async defer
   
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
   
</script>

It seems I need some API key now..?  I think I got one following the link there so I replaced the "YOUR API KEY" in the src

Also I do not have a function as the example called initMap, mine is initialise, changed that too but it does not run anyway.
Do I need to call that? also tried without but no luck.


 function initialize() {
       var myLatlng = new google.maps.LatLng(gpslat,gpslon);
        var myOptions = {
            zoom: 17,
            center: myLatlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU },
            navigationControl: true,
            navigationControlOptions: { style: google.maps.NavigationControlStyle.ZOOM_PAN, position: google.maps.ControlPosition.TOP_RIGHT },
            scaleControl: true,
            scaleControlOptions: { position: google.maps.ControlPosition.BOTTOM_LEFT}
        }
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
          
           var image = 'img/point.png';
             
         var infowindow = new google.maps.InfoWindow();
        var marker, i;
        for (i = 0; i < locations.length; i++) {
            addOption(document.lagerform.anl, locations[i][0], locations[i][3]);
            marker = new google.maps.Marker({
                position: new google.maps.LatLng(locations[i][1], locations[i][2]),
                map: map,
                icon: image
            });
            google.maps.event.addListener(marker, 'click', (function (marker, i) {
                return function () {
                    infowindow.setContent(locations[i][0]);
                    infowindow.open(map, marker);
                }
            })(marker, i));
        }

        google.maps.event.addListener(map, 'idle', function () {
            if (startad == false) {
                document.getElementById('loader').style.display = "none";
                startad = true;}
        });
       /* google.maps.event.addListener(map, 'dragend', function () {
          if ((gronOn == true) || (vinterOn == true)) {
                testArr();
            }
        });
*/

The map is at 

Barry Hunter

unread,
Oct 27, 2016, 7:46:39 AM10/27/16
to google-maps-js-api-v3

When I try that url the javascript console displays

js?...:96 Uncaught InvalidValueError: initialize is not a function

among others. You dont have a initialize  function in the page. You dont seem to be loading the API asynchronously, so remove the callback paramater. 

Your original loader didnt use callback, so probably the new one shouldnt either.  You could change over to uyse asynchronously loading, but might need to rearchitect the rest of the site. 
 

Thoern

unread,
Oct 27, 2016, 9:32:31 AM10/27/16
to Google Maps JavaScript API v3
aha, I figured it was some sequence issue. Did not really get what the ascync params in the src really did.

Chers//M
Reply all
Reply to author
Forward
0 new messages