I am trying to query timezone based on address or zipcode in HereMaps API. If any one knows can you please share the information.
Reverse Geocoding REST API can provide you timezone, when specifying locationattributes=adminInfo,timeZone
Exemple of Reverse Geocoding request
and extract of result:
Related
We are developing a WebGIS with AngularJS and JavaScript that use HERE Maps API.
We want to show the date of acquisition or update of the satellite maps published through Here Maps.
Is there any way to recover this information?
Geocoder API does give information about the mapVersionRelease. The following GET request uses the parameter locationattributes=mapReference to retrieve information about the currently used map version.
Please refer https://developer.here.com/documentation/geocoder/dev_guide/topics/example-geocode-mapreference.html and https://developer.here.com/documentation/geocoder/dev_guide/topics/resource-params-additional.html
I want to use Google Maps Tile server URL inside an application.
I'm using the URL
https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga
and it is working fine.
The problem is that I'm not sure how to use my Google Cloud API key for this URL.
I tried adding the API key at the end of the URL:
https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga&key=[MY_KEY]
but I don't see any activity on "Maps JavaScript API" in my Google cloud console. Meaning that the API Key is not being used.
Does this URL need an API Key?
It's working without the Key for now, but I'm afraid it may not work in the long run or it may be illegal to use it without the Key.
Ok, So I spend some time on this and found some solutions for directly using Map Tile Server URL (without any coding required). Here is a summary:
Google Maps:
The URL https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga currently works, but it is illegal to use as it violates Google Maps TOS Section 3.2.4a https://cloud.google.com/maps-platform/terms/#3-license. because it doesn't use an API Key.
There was a service called Google Maps Tile API, but it has discontinued since September 2019 (the API key need to be whitelisted to be able to use this service, and they don't do it anymore since Sep).
So it seems for now there is no easy and simple way to get Tile Server URL from Google Maps.
Bing Maps:
The URL is in the form http://ecn.{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}.jpeg?g=129 where quadkey is a compact representation of variables x, y and z. So doesn't work directly in applications that require URL's that have x,y,z variables.
Azure Maps:
The URL is in the form https://atlas.microsoft.com/map/tile?subscription-key=***&api-version=2.0&tilesetId=microsoft.imagery&zoom={z}&x={x}&y={y}. For different settings see here. The shortcoming of this approach is that currently it cannot be set to show hybrid maps (satellite + street and city names).
MapBox:
The URL is in the form https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=***. You can set the style of the map (currently set to satellite-streets-v11) by choosing the desired value from here and replacing in the URL.
If you want to directly access map tiles, consider Azure Maps. They don't have the restriction that Google Maps has. It's also cheaper. Here are some samples that directly access the tile server: https://azuremapscodesamples.azurewebsites.net/index.html#Third-Party-Map-Controls
Here are some other useful resources:
https://azure.com/maps
https://learn.microsoft.com/en-us/azure/azure-maps/
https://learn.microsoft.com/en-us/rest/api/maps/render/getmaptile
Currently I use Google Maps GeoCoding API to get location latitude and longitude from given address. However, the maps doesn't rendered correctly.
I check on the browser console and got following error "API keys with referer restrictions cannot be used with this API"
After check on google search, one of the recommendation is to change the API Key restriction to IP Address restriction.
But since the Geocoding API call is called from the browser, I assume the IP addresses I should registered in Google Console Platform is visitor IP Addresses. Is that correct ? Is anyone experience to set the IP Address restriction successfully ?
Thank you.
You can use Geocoding Service (as mentioned by #geocodezip) when you are trying to geocode an address in the client-side. The behavior, parameters and results of this two APIs are the same.
Sample address: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA
Geocoding Service sample demo: Please check this link
geocoder.geocode({'address': address}, function(results, status) {})
Geocoding API sample request: https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY
Compare the results! :)
Please note that for web service requests, you'll have to make sure that the address string you are trying to send is properly URL-encoded
Happy coding!
I'm having issues with Google Measurement Api. I need to manually report ecommerce transactions to the analytics, and the only data i'm getting from the payment processor is Country Code (which is not precise enough for our analytics process) and IP address of person doing the purchase.
We've tried sending uip (User IP override) param but analytics ignores IP and does not extract the Geolocation from it.
We've tried using geoid, but as i said is not precise. We need city information too. I see that geoid can take integer as param which describes the precise location, but i don't know how to get to that number if only thing i have is IP address.
Any help or advice will be appreciated.
Which hit type do you use?
You must fulfill all mandatory fields of GA measurement protocol so the request could be accepted by GA.
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
We are using Google Maps geocode service to get Latitude and Longitude for a given address,
We invoke google maps geocode service in a loop for each address(the loop max size is 50 addresses).
we are using this MAPs for State of Texas HHSC Help website (https://www.211texas.org/211/)
Below is service URL that we are using to get Latitude and Longitude.
http://maps.google.com/maps/geo?q=1601%20Rutherford%20Ln,Austin%20TX%2078754&key=ABQIAAAAU6mRnxlKP7D0V5v9DF3PIRT7KmOOtdkA0SYMLaxMRemphasized textpf2Wu2TCRTCqatXcIx0ULuVNHCz_jELYoAgXw&output=csv&oe=utf8&sensor=false
Google thinks this is Unusual traffic from our computer network, but it is not.
If you copy and paste the above link on your browser URL, you will see the below message.
The service is not working and it says
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
See Google Help for more information.
Need help ,
Sorry,If this is not right place to post this issue,
How to contact google on this issue, since its not commercial website issue.
or is there any alternative way to get Latitude and Longitude for given address.
Any insight would be appreciated.
Use the documented endpoint.
The documentation specifies:
http://maps.googleapis.com/maps/api/geocode/output?parameters