vUdav / vue2-leaflet-locatecontrol

locatecontrol plugin extension for vue2-leaflet package
MIT License
14 stars 4 forks source link

Geolocalization error on mobile devices. #4

Open giacomotontini opened 4 years ago

giacomotontini commented 4 years ago

I get the following error on both Safari and Chrome: "Geolocalization error: Origin does not have permission to use Geolocation service.".

iPhone X, iOS 13.1

C00Lzero commented 4 years ago

if you still have this error: add the following to your src-cordova/config.xml

         <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
            <string>Get Position</string>
        </edit-config>
        <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
            <string>Get position</string>
        </edit-config>

then rebuild your app