geolocation

Is Google Maps smart enough to refrain from adding markers at positions that are not currently being displayed?

无人久伴 提交于 2019-12-13 19:23:49
问题 In my app/site, I start off showing the contiguous USA but allow the user to select a state (or go back to USA48, or select USA50+) from a dropdown list (selection widget): <select id="stateSelector"> <option id="USA48">USA (48)</option> <option id="USA50">USA (50+)</option> <option id="Alabama">Alabama</option> . . . <option id="Wyoming">Wyoming</option> </select> I also allow the user to display various categories of markers depending on checkbox selections they make. These markers are

Elasticsearch geo distance sorting not exactly / wrong order

≡放荡痞女 提交于 2019-12-13 18:29:17
问题 I am using elasticsearch to get a faster geo distance search functionality for a web project with thousands of locations. The results should be sorted by distance. My search query works, but the order of the results is not correct. The results should be sorted ascending by distance, but there is a result at first with a distance of "9 km", then "100 km" and then "90 km". My search query JSON is the following (created with php): { "index": "profiles", "type": "profile", "size": 30, "from": 0,

Blackberry - getLocation() method cannot be called from event thread

守給你的承諾、 提交于 2019-12-13 16:14:30
问题 I want to get the longitude and latitude of device. I used location api to get the longtitude and latitude the problem now I am facing is that I could not call the getLocation() method inside button click event. It throws an error as getLocation() method cannot be called from event thread.Can any one tell me how to solve this problem? 回答1: You simply create another thread and call getLocation() from that thread. See the documentation for java.lang.Thread in the API documentation. 来源: https:/

How can I programmatically check whether geo-tagging is enabled?

余生颓废 提交于 2019-12-13 16:07:31
问题 I spent some time searching for an answer by myself, but couldn't find a solution. Is it possible to check programmatically in my App, if the option for geo-tagging pictures in the settings of the camera-app (which I use) is activated or not? 回答1: I looked through the Camera.Parameters Javadoc but didn't find any relevant methods. I don't think it is possible to do that programmatically unless you re-implement com.android.camera . 来源: https://stackoverflow.com/questions/6942252/how-can-i

Cordova geolocation not working on Android

大城市里の小女人 提交于 2019-12-13 15:54:28
问题 I want to use geolocation on Android. I write app in Apache Cordova. Geolocation do not work both on andoid pc emulator and andoid phone. I try http://cordova.apache.org/docs/en/2.4.0/cordova_geolocation_geolocation.md.html#geolocation.getCurrentPosition_full_example and http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation My platforms/android/AndroidManifest.xml: <?xml version='1.0' encoding='utf-8'?> <manifest android:hardwareAccelerated="true" android:versionCode="1"

Storing coordinates (geolocation) in array to calculate distance

女生的网名这么多〃 提交于 2019-12-13 15:23:20
问题 Me and my partner are working on an exercise web application for our school thesis. We are trying to get a runner's position and track him during his workout with the watchposition() function of the geolocation api. On-screen the runner can check his current distance. This is the point were we are stuck, we can only calculate the distance between the start and end point but when the course is a circle the total distance covered displays zero. So we had the solution to store multiple

JavaScript Google Maps API - Center on User's Location not loading map

拈花ヽ惹草 提交于 2019-12-13 15:16:30
问题 I've posted before but I wanted to update the question, I tried to delete the other question but I had to flag it do that so I left it alone. I have a key for the Google Map API, but the map will not appear or load. Here is my code: Index.html <script src = "loc.js"></script> <input type ="button" value="Get Location" onclick="getLocation();"> <div id="spot"></div> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDEiqN2L1odkK645Il8bBVCDqatth6aZyU&callback=getLocation"></script>

Get iPhone location in iOS without preference Location Services set to ON

一笑奈何 提交于 2019-12-13 14:33:28
问题 I'm writing a daemon similar to Chris Alvares daemon. I want to get the divice location in background without users permission. If the Location Services preference in Settings is set to ON then I have no problem getting location. For this I'm adding to my executable entitlements com.apple.locationd.preauthorized key with boolean value set to true. The problem is when the Location Services is off. In this case when I want to get the device location a UIAlertView pops up telling the user that

java.lang.SecurityException: Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission

安稳与你 提交于 2019-12-13 14:10:14
问题 I am developing an android where I want to get user location using NETWORK_PROVIDER,I am not using GPS for this purpose.I am getting following exception java.lang.SecurityException: Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission and I am using following code.] tx=(TextView) findViewById(R.id.textView1); lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000, 10f, this); tx.setText("Status="+lm

How do i reset the geo-location service settings each time my page loads with HTML5 and Javascript

别等时光非礼了梦想. 提交于 2019-12-13 12:51:27
问题 I am working on a web page where I need to get permission from a user to access location. but according to my story. I need to make sure that if any particular user has selected Deny previously then on each page load I need to show him a prompt saying [website] want to use your computer's location as shown in the snapshot below: But on the other hand, if the user has selected Allow it should not prompt anymore. Is there any easy and straightforward way to achieve this functionality with JS or