latitude-longitude

Getting Current Location Longitude and Latitude without Change my Position

╄→гoц情女王★ 提交于 2019-12-11 11:40:33
问题 I can find the current location latitude and longitude.But These data are not shown before change my current position.I want to get current location longitude and latitude without change my position. package com.example.gps; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android

How to get GLatLng object from address string in advance in google maps?

旧城冷巷雨未停 提交于 2019-12-11 10:54:22
问题 I want to get latlng object in google maps in advance. Basically my json result is returning array of address which I need to convert to glatlng to use for markers. But if i will use GeoCoder object then it will send asynch request which I don't want. Is there any way other than GeoCoder object to convert an address string to GLatLng object? 回答1: You can take a look at the json object returned by any query to the maps api. Then you use the json serializer in system.web.extensions to serialize

Finding if a given position (lat, lon) is within the BoundingBox of two coordinates (route-me)

有些话、适合烂在心里 提交于 2019-12-11 08:35:33
问题 I am working on an iPhone app using the Route-Me project. I am using a method called 'latitudeLongitudeBoundingBoxForScreen' which returns a set of two cooördinates. Defining the Northeast and Southwest corners in lat/lon of your screen. This seems to work fine. My question is how can I determine whether a given point (lat/lon) is within the boundaries of these two coordinates (northeast,southwest)? Thank you very much in advance for your help. 回答1: For general point in a polygon, the Point

How to handle missing values when using a reverse geocode function?

让人想犯罪 __ 提交于 2019-12-11 08:35:02
问题 I am currently working with data (N of 271,848) in R that looks as follows: Observation Longitude Latitude -------------------------------------- 1 116.38800 39.928902 2 53.000000 32.000000 3 NA NA 4 NA NA And I am using a reverse geocode function from the following post: Convert latitude and longitude coordinates to country name in R When I run the coords2country(points) line, I get the following error: "Error in .checkNumericCoerce2double(obj) : non-finite coordinates" My best guess is that

Sending latlng values to mysql query to update Google Maps Markers via routeboxer

痞子三分冷 提交于 2019-12-11 08:19:15
问题 I'm using Routerboxer to generate a list of latitudes and longitudes within a certain route. I want to send the lat and lngs back to my database query (I presume using ajax) to return markers within the bounds. I have searched and found the database query needs to be: SELECT * FROM as24 WHERE lat > a AND lat < c AND lng > b AND lng < d My question is how do I send these a,b,c and d's to the PHP page? function calcRoute() { clearBoxes(); distance = 10 * 1.609344; //within 10 miles var start =

Calculate possible lines from points

随声附和 提交于 2019-12-11 07:22:54
问题 I am trying to check the points positions and detect whether they are in a line, then output an object containing the possible lines. Questions: Is this the best way to do it? efficient having four loops? I am also getting duplicates matching points within the double loop, what's the best way to remove those? If I wanted to detect shapes e.g. square (90 degrees angles), equilateral triangle (60 degrees angles) etc, how would I extend it? if I wanted to do advanced detection of patterns in the

Not able to set multiple markers on the Google maps using Google map javascript api v3

只谈情不闲聊 提交于 2019-12-11 07:22:10
问题 i want to place multiple markers on the map but I'm getting a map with no markers set. <script type="text/javascript"> var map; var i; window.onload=function() { var mapOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, center: new google.maps.LatLng(59.32522, 18.07002) }; map = new google.maps.Map(document.getElementById("map"),mapOptions); var bounds = new google.maps.LatLngBounds(); var places =[]; places.push(google.maps.LatLng(40.756,-73.986)); places.push(google.maps.LatLng

How to show current location of user while open my app

寵の児 提交于 2019-12-11 07:01:10
问题 I want to make an app, when user open my app user will get their current location in my app and while user change their location it will also update after some specific time. I got solution of changed location while user change their location but i need to show current location of user while user open my app . 回答1: googleMap.setMyLocationEnabled(true); Location myLocation = googleMap.getMyLocation(); These are the the key lines to get current location. for more info ,refer these tutorials:

Google's GeoCode Convert City, STATE into Latitude Longitude

偶尔善良 提交于 2019-12-11 06:07:29
问题 The following code works asynchronously. I only have it set up to convert a City, State into latitude and longitude. That value is then alerted. How can I write a function that actually returns these values? var map; var geocoder; function initialize() { geocoder = new GClientGeocoder(); } // addAddressToMap() is called when the geocoder returns an // answer. It adds a marker to the map with an open info window // showing the nicely formatted version of the address and the country code.

Distance between two lat/long points in Classic ASP

♀尐吖头ヾ 提交于 2019-12-11 05:34:12
问题 I have two pairs of latitude/longitude, and want to find the distance between them. I am stuck with using Classic ASP on this particular website. I found plenty of code examples using the Haversine equation, but not in ASP (which lacks the ACos function, and doesn't have pi built in! I eventually got some code working, but after careful testing it proved to be flawed. My understanding of spherical geometry isn't good enough, so please can anyone say if they have done this in ASP before?!