Unable to get correct map using gdirection load method when longitude and latitude are passed - google-maps-api-2

I am using Gdirections google API. In that I am required to pass longitude and latitude in load method as parameters of source and destination. But when I pass longitude and latitude as parameters, it gives me a map with wrong directions. But when I pass source and destination address it gives me correct map.
How can I get a map with correct driving directions when lat and long is passed?

Here is one example of usage...
try below thing
gdir.loadFromWaypoints(["New Y...#40.714490,-74.007130", "NewJer...#40.072410,-74.728565"]);
Change New York and NewJer.. With the city or state you want..
Let me know it works for you or not.. Hope it helps..

Related

Firebase database error...unable to load data to my custom adapter

Exception Error during Debugging
Code where error occors
It looks like in your database you store longitude and latitude as numbers, while in your ListDocModel class you have them as string fields/properties.
The solution is to make longitude and latitude of type Long in your ListDocModel class too.

Foursquare API - Cannot query using Category ID and same results keep coming back

I am writing a Foursquare API to find all the Bus Stops via category ID (52f2ab2ebcbc57f1066b8b4f) within a set radius from a set location in New York. I am using the following code:
CLIENT_ID = '123'
CLIENT_SECRET = '456'
latitude = location.latitude
longitude = location.longitude
intent = "checkin"
VERSION = '20180604'
radius = 5000
LIMIT = 10
category = "52f2ab2ebcbc57f1066b8b4f"
and these variables are passed to the URL as follows:
url = 'https://api.foursquare.com/v2/venues/search?client_id={}&client_secret={}&ll={},
{}&intent{}&v={}&radius={}&limit={}&category{}'.format(CLIENT_ID, CLIENT_SECRET,
latitude, longitude, intent, VERSION, radius, LIMIT, category)
which gives
https://api.foursquare.com/v2/venues/search&client_id=123&client_secret=456&ll=40.7149555,-74.0153365&intentcheckin&v=20180604&radius=5000&limit=10&category52f2ab2ebcbc57f1066b8b4f
However, this query returns locations which are not Bus Stops - but the category IDs that are being returned are also not to be found on the Foursquare Dev website, as follows:
In addition, whenever I change the ID to test the code, it brings back the same info. I cant get it to change. Something isnt updating somewhere and I keep restarting my notebook with no effect.
Do we know why my code isn't bringing back bus stop location?
Does it matter the order that I send in the URL? e.g. could I define intent after LL or Category after client ID?
Why am I getting the same return each time?
Thank you.
I have used a workaround to search under a query using the text from the category ID instead. Not perfect, but gets me to where I need to be.

How do I plot an address using UWP MapControl

For the Universal Windows Platform (UWP) MapControl, I want to plot a street address. Unfortunately, as far as I know, the control only accepts Geopoint locations for Center.
Ex:
myMap.Center =
new Geopoint(new BasicGeoposition()
{
//Geopoint for Seattle
Latitude = 47.604,
Longitude = -122.329
});
How do I convert a street address to a Geopoint location and back again? Is there another way to plot street addresses?
Thanks for your help.
To convert a street address to a Geopoint location and back again, you can use the MapLocationFinder.FindLocationsAsync and MapLocationFinder.FindLocationsAtAsync method.
Convert addresses to geographic locations (geocoding) and convert geographic locations to addresses (reverse geocoding) by calling the methods of the MapLocationFinder class in the Windows.Services.Maps namespace.
For more info, see Perform geocoding and reverse geocoding.

Using an address with Venue Search

I am trying to use a full address with venue search and not having much luck.
Passing the string 'brooklyn NY 11201' via the near param returns a list of venues in the 11201 area code.
Passing the string '22 Jay St, Brooklyn NY 11201' via the near param returns a failed geocode error.
The near, client_id, and client_secret params are the only params I am passing. Is there something else that I need to get the foursquare geocoder to work, or does it just not accept specific addresses?
Unfortunately, the Foursquare geocoder doesn't support the conversion of fine street addresses very well. City- or zip code-level granularity will be your best bet.

GXT LiveGrid set default status string before and after loading the data through RPC call

I am using a liveGrid to load the data dymaically from the server.
The code is working fine. Now, I need to do a small enhancement in that, and for that I need some advice.
I need to display, a generic string like "Loading...", before the data gets populated from the server.
This can be done as following :-
LiveGridView liveView = new LiveGridView();
liveView.setEmptyText("Loading...");
Now, once the RPC call returns, I get my data, and I set the same in the live Grid and that works fine.
But when I dont get any data from the RPC call, I need to change that "Loading..." string to a new string like "No data available on the server". So, how can I do that?
Thanks in advance.
Regards
Ajay
I got the solution for this.
After the data is loaded, we can add a Loader.Load listner on the loader, and check the Length of the result. If it equals zero, then change the LiveGridView's emptyText value.
Thanks
Ajay

Resources