geolocation

How to expire or reset geolocation

六眼飞鱼酱① 提交于 2019-12-23 07:56:18
问题 When a user hits my website I check to see if I have a location session set in PHP. If there is no session set with the users location in I redirect them to www.domain.net/location. On this page there are a number of options for the user to pick a location. If the browser allows it one of the options is to use the browser to set this. The below code works really well. The issue I am having is that once a user has allowed the browser to share the location this seems to be set forever. Whilst

Determining if geolocation enabled with react native

笑着哭i 提交于 2019-12-23 07:12:32
问题 Building an app with RN I use the following to receive user's location : navigator.geolocation.getCurrentPosition( (position) => { //do stuff with location }, (error) => { //error or locaiton not allowed }, {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000} ); Which immediately invokes the inquiry for user to accept geolocation permissions. What I'm trying to achieve now is to have an explicit screen before prompting user to click on a button to accept those permissions. In order to

Get weather by html5 geolocation [closed]

会有一股神秘感。 提交于 2019-12-23 06:48:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Is there a free API to get the local weather by geolocation lat/long coordinates? 回答1: World Weather Online API - http://developer.worldweatheronline.com/ They are very explicit with their pricing model. Their free tier includes: Local city and town weather current conditions plus 5 day weather forecast, 24

Which longitude/latitude adjustments do I need to enlarge my map to the northwest and to the southeast?

[亡魂溺海] 提交于 2019-12-23 06:07:14
问题 This is related to my earlier question I want to add a "shim" to my map so that the extreme pushpins aren't half-in bounds, half out-of-bounds. I'm on the right track (no pun intended), but my logic is faulty. I wrote this method: // Adapted from Brundritt and Boonaert: https://stackoverflow.com/questions/26937358/can-i-adjust-my-bing-maps-view-locationrect-bounding-box-by-a-small-amount public static Location GetAShimLocation(IList<Location> locations, bool IsForNorthwestCorner) { const

How to implement Push Notification Based on Geo Location in Objective-C?

和自甴很熟 提交于 2019-12-23 05:39:05
问题 How to implement geo location based push notifications ? I have been referred to the following solution: How to use geo-based push notifications on iOS? In the above link they have given local notification based solution: UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.alertBody = locationData; localNotification.alertAction = @"Location data received"; localNotification.hasAction = YES; [[UIApplication sharedApplication]

Calculate zipcodes in range

ⅰ亾dé卋堺 提交于 2019-12-23 05:35:15
问题 I have a website where users start by entering their zipcode. I have a table with different shops which also contain the zip codes belonging to the shops. Is it possible to get the zip codes within let's say a 5 km radius of the zip entered by the user? So I can query the database and find all the shops near the user. Can I use Google Maps for this? Should I get my hands on a pre-computed list of all zipcodes (single country) and their coordinates? Any other suggestions? 回答1: You'll need that

Open Graph Map layout

前提是你 提交于 2019-12-23 04:52:39
问题 I succesfully posted an action to open graph with the 'Item' attachment layout. However I also want to post a action with the 'Map' attachment layout. My iOS app has an array with coordinates which form a route on a map. I looked everywhere but just cant find a good tutorial which explains how to achieve this. Does someone know how to post a action to the open graph with a route preview on the map? 回答1: When you are creating your Open Graph custom Objects, you need to define a property of

GPS tracker coordinate conversion into google maps format and preciseness

匆匆过客 提交于 2019-12-23 04:40:33
问题 I own gps tracker that send latitude and longitude to my server, as it is described in gps tracker manual(example for Latitude, for Longitude the same): xxmm.dddd, where xx = degrees; mm = minutes; dddd = decimal part of minutes; for example 11 deg. 26.6639 min. I`d like to convert received coordinates into google maps format, for this purpuse I am using formula: result = xx + (mm.dddd)/60 since, there is a division result could be presented as periodically fraction, for example - 1.6666(6),

GPS tracker coordinate conversion into google maps format and preciseness

╄→гoц情女王★ 提交于 2019-12-23 04:40:14
问题 I own gps tracker that send latitude and longitude to my server, as it is described in gps tracker manual(example for Latitude, for Longitude the same): xxmm.dddd, where xx = degrees; mm = minutes; dddd = decimal part of minutes; for example 11 deg. 26.6639 min. I`d like to convert received coordinates into google maps format, for this purpuse I am using formula: result = xx + (mm.dddd)/60 since, there is a division result could be presented as periodically fraction, for example - 1.6666(6),

How to detect nearby android devices using the same app

混江龙づ霸主 提交于 2019-12-23 04:37:57
问题 So basically I have made a few small apps in the past, but this is my first 'proper' app. One of the main features of the app, and the bit that I am struggling with is that I need to be able to populate a ListView with all of the other users logged into the app, however I only want to display users that are within a set distance, for example 10 meters. I tried using Bluetooth to achieve this, however that didn't work. I would now like to use location services to do this. My idea is to have to