Google maps. Coordinate parser by titles - google-maps

I think it's common task.
I have about 2400 raws in database with titles of skiing resorts. I have to parse coordimate of point in search results of each raw. Sometimes, result has more than one point, how can i occurate results?
Suggest best algorytm for this task. May be Google Maps API has some helpfull methods for this task.

I think you can consider about JQuery to send a async request to the the server, the server responses for retrieving the data. After retrieving your rows of data, you can build these position with JSON which likes this [{x:1,y:1},{x:2,y:2}]; it means two rows of data. When the server method runs completely, the client side raises a callback which can access result JSON; the JSON can be manually parsed by you to the LatLng object in Google API right. I think you know the rest stuffs.
Hope it helps.

Related

I have an app that I'm building using a finance API that works but can't break down the JSON response to get the data into powerapps

I have set everything up so far (API request, parse json and respones) and can see my data in the response section in power automate, but when I go to powerapps to extract the data, I can't seem to pull it out because of the crazy JSON output. Also, I did this process before and had no problems with a different API (alpha vantage). Thanks
I tried several data pull logics in powerapps by filtering but none worked.

Google Maps API - matching a request with the asynchronous response

I'm using the google maps distance matrix javascript API to query the travel time from one point to about 50 destinations.
in order to do this, I need to break my query up into multiple chunks, since the google maps API allows only a maximum of 25 destinations per request.
the problem that I'm having is the synchronization of the request and the result.
other APIs offer the option to include a key that lets the developer match a request and an asynchronous result.
however, since such a parameter is missing from the request specification, I have no idea how to make sure that I'm matching the right data to my incoming results.
I would be glad for a "clean" workaround - currently the only idea that I'm having is to have a unique number of destinations for each request, for instance the first with 25, the next with 24 destinations and so on. but I would not consider this a satisfactory approach.
thank you

Extracting quarry sites geographic data from OSM or Google Maps API

Does anyone know where or how I can get geographic data for quarry sites for Australian states or local governments? I have searched all over the data repositories hosted by the levels of government.
Now I resorted to extract this data from Openstreetmaps or Google maps API, but I can figure out how to achieve this after trying to check around. All the pointers doesn't seem to yield any data.
How can I get data and specifically quarry sites from OSM or Google Maps API?
Quarries are tagged in OSM as landuse=quarry. For retrieving specific data you can use Overpass API. Overpass API has a nice frontend called overpass turbo.
Here is an example query for retrieving all quarries in Australia:
[out:json][timeout:90];
// fetch area “Australia” to search in
{{geocodeArea:Australia}}->.searchArea;
// gather results
(
// query part for: “landuse=quarry”
node["landuse"="quarry"](area.searchArea);
way["landuse"="quarry"](area.searchArea);
relation["landuse"="quarry"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
You can view the result here. There are also options for downloading raw data.
Constructing the query is as simple as opening overpass turbo, opening the wizard and typing "landuse=quarry" in Australia. Afterwards the timeout parameter has to be raised manually since the default timeout of 25 (seconds) is too low for querying such a huge country.
Note that the query language of Overpass API is quite powerful and there are many ways to enhance your query. Also note that it is possible to call Overpass API directly without the need of overpass turbo which is just a nice frontend.

Google Map Result as XML or JSON

I have this url to view the nearest hospitals with the given coordinates.
http://maps.google.com/maps?q=hospitals+near+{lat},{long}
Is their a way to get the results in XML or JSON?
Thanks!
You have lots of options, starting here. IF you want a URL you can query and get back XML or JSON then go here.
Those are links directly to the Google APIs documentation. You have many options available including a JavaScript API as well as a web service that can retrieve JSON or XML.

Hiding google map data

I've been working on a google map (v3 of the api) that is plotting 120 markers or so (or will do shortly). If you view the source the map data is for all the see, is it possible to hide this?
I'm not worried about the code that is generating the map, just the data. The data is grabbed from a Wordpress cms.
I think your options mostly boil down to:
Obfuscate the data. Restructure it in such a way that it is difficult to recognize as location data, and inconvenient for other people to work with.
Don't include the data directly in the page body. Fetch it using an AJAX request instead. Determined users will still be able to get the data, but it won't be quite as easy/obvious, and it will not appear when doing a 'view source'.
You could of course combine the two approaches, and have an AJAX request that returns obfuscated data.
Although, your data appears to be names and locations of businesses, so I'm not sure why protecting it is a concern. Presumably any interested party could find the same information in a phone-book (or with a Google search) if they were so inclined.