Hrlp I can't extract lat and long from leaflet geocoded searcher - leaflet

heelp i just want lat and long of something whenever I type a new search L.Control.geocoder().addTo(map)

Related

Query for pointers in Parse Sdk Android

I have a Favorite class that has a pointer to a class called Location as one of its location fields. I want to query the Favorite class and retrieve all objects that point to a certain Location object. In javascript I just create a Location object, set the id to the objectId of the location I am interested in and query for Favorite where location is equal to that object.
But in android there is no way I can set the objectId. Also setting the query just to the string of the objctId is not working.
// Something I would have expected existed
//ParseObject location = new ParseObject("Location");
//location.setObjectId(locationId);
final ParseQuery<ParseObject> query = ParseQuery.getQuery("Favorite");
// if I had the location object, but I only have the locationId
//query.whereEqualTo("location", location );
query.whereEqualTo("location", locationId);
query.findInBackground(...
query.whereEqualTo("location",Parse.createWithoutData(reference_classname,ObjectId));

Mapbox Geocoder seems to center in the incorrect location for New York City addresses

I'm using https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
map.addControl(new mapboxgl.Geocoder());
But when I try New York City addresses the map centers on an incorrect location.
I expect the address to be the center of the map when the map relocates.
But I see that it is incorrect, sometimes by a lot
For example, for "1 Broadway, New York, NY" I see (1 Broadway is not even viewable without panning and zooming)
Is there a better geocoder example that works correctly for NYC addresses?
BUT the correct map is something like this:
It seems to work in other locations
Moscone Center SF (correct)
Whitehouse (correct)

PyroCMS Geocoder Field Type Plugin Error

This field type is awesome, but I can't get it to work.
I save a record to the database, only the address is saved. The database column looks like it is saved in json format, but my records do not have a lat or lon value.
Then I display the data on a page and I get an error that lat and lon are null values. The error occurs in field.geocoder.php line 88.
Has anyone used the geocoder plugin before? Is lat and lon being saved in your database?
I am using pyro pro 2.2.
Eureka! https://github.com/HighwayofLife/PyroStreams-Geocoder-Field-Type/issues/7
From twoplers:
To fix, change lines 60-61 in geocoder.js
FROM:
'lat': loc.jb,
'lng': loc.kb,
TO:
'lat': loc.ob,
'lng': loc.pb,
Hope this helps.

Turning off reverse geocoding when opening "Maps" in iPhone through a URL with lat./long. parameter

I am trying to figure out how to use the Google Maps URL format for sharing locations as latitude/longitude in an app that I am developing for iPhone.
Example: http://maps.google.com/maps?q=40.77407,-73.96675
This is a point in Central Park, New York. When using this on an iPhone, "Maps" will open and reverse geocoding will be done, resulting in an address on the nearby 5th Ave.
But for sharing a meeting point in Central Park, this is quite useless!
Is it possible to specify any parameter in the query string that will turn off reverse geocoding, so that the exact lat/long position is shown in the "Maps" app on iPhone?
(Compare with the result one will get when entering this url on a desktop, where the exact location will always be pointed out by a green arrow.)
I found the answer myself: Adding "loc:" immediately after "q=" will turn off the reverse geocoding.
Example: http://maps.google.com/maps?q=loc:40.77407,-73.96675
Instead of a generic 'q', which according to specification is treated like a generic query
This parameter is treated as if it had been typed into the query box by the user on the maps.google.com page. q=* is not supported.
you could try ll or saddr.
ll The latitude and longitude points (in decimal format, comma separated, and in that order) for the map center point.
saddr The latitude and longitude points from which a business search should be performed.
The maps url scheme is specified here: http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html

how to get latitude and longitude of a place using objective-c?

how to get latitude and longitude values of a particular place using objective-c ? Do I need to get this using Google Geocoding API or Is there any other way to get this?
The iPhone only knows its current location (if using location-service). For getting the current location and for locations like: 10km east, 2km north from current location you can use the location-service (CoreLocation) but for any other location (which are identified via a name, street, text) you have to use a web-service like Google Geocoding API, Open Street Map Nominatum, YahooMaps-Geocoding (yes, they have one...), ...