Here Maps Traffic REST API - Roadways to Lat Lon Location - here-maps-rest

I'm relatively new to using HERE maps so I apologize in advance if I'm a little off base here. I would like to use the Traffic API and need to somehow get lat lon data to plot on a map.
The request url I am using:
https://traffic.api.here.com/traffic/6.3/flow.json?app_id=xxxx&app_code=yyyy&bbox=30.401579,-97.738369;30.395744,-97.733266&responseattributes=sh%2Cfc
I've found the documentation about the flow response format here:
https://traffic.cit.api.here.com/traffic/6.0/xsd/flow.xsd?app_id=xxxx&app_code=yyyy
however, I am having trouble figuring out how to make this data useful. I see that each roadway has an LI (Unique string identifier for this Linear) and each flow has a TMC PC code but I'm not sure exactly what either of these mean and what I need to do to get more useful location data. Any help is much appreciated! Thank you!
UPDATE
I did find that in the url I can add the param to include response attributes (I've updated the url above). I've used this to as for the SHP attribute which will include an array of arrays of lat lons however I'm still having trouble understanding the format and why it's an array of arrays. Thanks again!

Have you considered using HERE Map Tiles API? Live traffic tiles have been deprecated in the Traffic API and are now available only on the Map Tiles API.
With Map Tiles API you also have great control over your map, being able to display POIs, truck restrictions and others.
You will have to workout the concept of row/column required by the tiles with your BBox though.

Related

Is it possible to show a satellite map on Windows 10 UA app

I'm trying to make my first Windows 10 UA desktop app. I have a working map, but it shows the road type of map. The problem with this is, the detail isn't there, and may people won't be able to get enough info out of this.
Is there a way I can switch the map view from a road to a satellite map?
Edited for response
Sorry I miss understood, didn't realize you where using the MapControl class. Below is a link that explains how to use 3d aerial and street views (towards the bottom)
https://msdn.microsoft.com/en-us/library/windows/apps/mt219695.aspx
the code you are looking for is something like
MapControl1.Style = MapStyle.Aerial3DWithRoads;
Absolutely! You can use the Bing maps API. http://www.microsoft.com/maps/choose-your-bing-maps-API.aspx
Here is a link to a guide on getting started.
https://msdn.microsoft.com/en-us/library/ff428643.aspx
From the API you can then select the satellite map instead of the road.

Instagram - Obtaining data in realtime

I am trying to get the recent post from a particular location. using this url.
https://api.instagram.com/v1/media/search?lat=34.0500&lng=-118.2500&distance=50&MAX_ID=max_id&access_token=XXXX
So when I use this URL for the first time, I get 20 results. I obtain the max ID from the list of 20 results and modify my url .
But when I use the modified URL, I obtain the same result as the first one.
How do I go about solving this?
Contrary to what I thought, the media search endpoint doesn't return a pagination object. Sorry. It also doesn't support the min_id/max_id parameters, which is why you are having problems..
If you want to get different data you are going to have to use the time based request parameter MIN_TIMESTAMP. However it looks like that parameter doesn't work for that endpoint either (though the documentation says it is supported). Indeed, a quick search on the internet reveals it might be a long standing bug with the api.

Unable to extract data using Import.io from Amazon web page where data is loaded into the page via Ajax

Anyone know how to extract data from a webpage using Import.io where the data is loaded into the page via Ajax?
I am unable to extract data from below mentioned pages.
There is no issue in first page data extraction, but how do I move on to extract data from second page?
URL is given below.
<http://www.amazon.com/gp/aag/main?ie=UTF8&asin=&isAmazonFulfilled=&isCBA=&marketplaceID=ATVPDKIKX0DER&orderID=&seller=A13JB7253Q5S1B>
The data on that page is deployed using an interesting mix of technologies; it relies heavily on server side code and Javascript. That type of page can be a challenge, however, there are always methods to get the data. For example, some sellers have a page like this:
http://www.amazon.co.uk/gp/node/index.html?ie=UTF8&marketplaceID=ATVPDKIKX0DER&me=A2WO1PQ2OIOIGM&merchant=A2WO1PQ2OIOIGM
Which is very easy to extract data from, even using the magic algorithm - https://magic.import.io/?site=http:%2F%2Fwww.amazon.co.uk%2Fgp%2Fnode%2Findex.html%3Fie%3DUTF8%26marketplaceID%3DA1F83G8C2ARO7P%26me%3DA2WO1PQ2OIOIGM%26merchant%3DA2WO1PQ2OIOIGM
I had to take off the redirect=true from the URLs before it would work - just an FYI.
Other times some stores don't have such a URL, its a bit of a pain, and there URLs can be tough to figure out.
We do help some of our enterprise customers build bespoke APIs when the data is very important to them, so do feel free to get in touch. I imagine a larger scale workaround would be to create a dataset/API based on a the categories you are interested in and then to filter that larger dataset down (python or CSV style) by seller name. That would probably work!
I managed to get a static dataset but no API. You can find that dataset at the following GUID: c7c63f1c-7081-4d4a-ad91-afe9789a6620
Thanks

Data Set that can be used for statistics

I need some raw data to visualize it with google charts and some other APIs. Problem is that i some raw data that includes timestamps too.
For example visitors visiting a website i.e. from which device (mobile/computer etc) they accessed website, at what time (hours:minutes:second:miliseconds) and what which links they visited etc. Please help me to know if someone knows about such kind of dummy raw data on web.
You can build your own dataset using Google Spreadsheets.
For example, consider the spreadsheet from the link below:
https://docs.google.com/spreadsheet/pub?key=0Aj9J3uCNjN9_dG1rdmNtTlhyNWpkTUVHVHBwRzNWX2c&output=html
If you tweak the link, it can provide you with the JSON representation of the data.
https://docs.google.com/spreadsheet/tq?key=0Aj9J3uCNjN9_dG1rdmNtTlhyNWpkTUVHVHBwRzNWX2c&pub1
Basically, what you have to do in order to get the JSON response is replace the "pub" element to "tq" and remove the "output=html" element at the end adding "pub1" instead.
With this procedure you should be able to create your own datasource for your tests.
You can find more information on the Google Chart API documentation:
https://developers.google.com/chart/interactive/docs/spreadsheets
Hope it helps

Suggest list in google maps search input

We need to create search input field like it is on _http://maps.google.com
The key functionality is suggest list with appropriate results. We
have not found this feature in API.
Analyzing maps.google.com we see that suggest list is received
from get request to this url
https://maps-api-ssl.google.com/maps/suggest?q=%D0%BC%D0%BE%D1%81&cp=...
There are many parameters, including data from search field. This get
request returns our suggest list.
Is there a possibility to use this url in our needs with our data. Or
how can we make it in some other way.
Similar to our needs: _http://cdn.michaelhart.me/mh/instant/maps/
check this out:
http://tech.cibul.net/geocode-with-google-maps-api-v3/
Theoretically you shouldn't use maps-api-ssl.google.com/maps/suggest as it might not be legal. I found this quote from google employee:
'Endpoints like this that are used by Google Maps but not documented as
part of the Maps API should be considered private interfaces.
Consequently use of those end points is a breach of the Terms of
Service. In addition any existing API credentials you may have are
completely unrelated to these end points because they are not served
by API infrastructure'

Resources