Google Maps tracks API - javascript

I need help: I am developing an application with use Google Maps tracks API. I am not able to use the Google Maps tracks API. I am using the documentation.
In the documentation there's:
*Request and response format
The API accepts requests and returns responses in JavaScript Object Notation (JSON) format.
All requests are made using HTTP POST requests.
Base path
The API's base path is: https://www.googleapis.com/tracks/v1/path/to/method*
How do I import the map using Google Maps tracks API? Or how do I to show a map using Google Maps tracks API?
For example using Google Maps API v3 this code works:
src = 'https://maps.googleapis.com/maps/api/js?key=myKey&sensor=true';
I thought the code below is correct but doesn't work.
src = 'https://www.googleapis.com/tracks/v1/path/to/method?key=myKey&sensor=true';
Thanks for help.

Related

Google Maps API Error: This API key is not authorized to use this service or API. Places API error: ApiTargetBlockedMapError

I've started getting this error from a Google Maps widget within a CMS I use:
This API key is not authorized to use this service or API. Places API error: ApiTargetBlockedMapError
The error message provides a helpful link to this page, which includes the following text:
ApiTargetBlockedMapError Error
The Maps JavaScript API has not been authorized for the used API key.
Please check the API restrictions settings of your API key in the
Google Cloud Platform Console.
See API keys in the Google Cloud Platform Console. For more
information, see Using API Keys.
I know Google has tweaked this API in the past, so I went to the console and checked the permissions given for the key I am using. It includes these four permissions, include the Maps JavaScript API permission:
Geocoding API
Maps Embed API
Maps JavaScript API
Maps Static API
The only part not working is the address auto-complete. When I change to Don't Restrict Key mode so the key works with all services, it works fine. Any idea which service checkbox I might be missing? I'm wondering if Google is just displaying the wrong error.
Any ideas?
This is what I did. Updated.
Make sure you have enabled all the next Google Maps Services
If you have key restrictions, make sure you add the services like the next image..
Restart the project. It worked.
It turns out that Google has tweaked their permissions settings without updating the error. I had to give access to the Places API as well for the autocomplete to function.
I've submitted a PR to the CMS widget's documentation:
https://github.com/Frojd/wagtail-geo-widget/pull/59/files

JavaScript - Best way to import JSON data from Eventbrite API to Google Maps

Please excuse this amateur question. I'm building a web app and would like to extract Eventbrite's JSON data sorted by address onto my embedded Google maps.
Right now I have the data in my console using fetch. How can I display this data on Google map as markers?
Any help is appreciated. Thanks!
Start here: https://developers.google.com/maps/documentation/javascript/markers
The code sample provided in this documentation is formatted for GeoJSON but you should be able to use the nodes from your EventBrite JSON if they provide coordinates. If coordinates are not part of your source JSON you will need to make a separate API call to Google Maps API Geocoding Service

ArcGIS API for JavaScript - Search widget with external geocode service

To be brief, I want to add to my Search widget new geocode service that is not exposed by the ArcGIS Server REST API (more precisely - OneMap REST API - https://docs.onemap.sg/). I wonder if it is possible to add this service as widget source using Locator object and how to do that.
Thanks for every advice.

using google maps api without a key

The instructions for v.3 of the Google Maps API say that I
should load the Maps API using an API key
Curiously it says I should..., rather than I must..... Anyhow, at the moment, I am not using an API key simply because (as far as I can remember) there was no mention of an API key when I was writing the code that calls this API.
Should I go back and add an API key to the URL that loads the API? It seems to work fine without the key, so I don't have any particular incentive to do this.
You're actually required to not have a key if you're a business user. Here's a quote from Google:
Google Maps API for Business developers must not include a key in their requests. Please refer to Loading the Google Maps JavaScript API for Business-specific instructions.
Normal users, however, will be fine with or without a key, although Google recommends having a key so you can monitor the API usage. Here is a quote verifying this:
The Google Maps JavaScript API V3 does not require a key, but there are benefits to using one.
You only need a key if you want to use the API management console to restrict access, collect usage statistics, etc. So, a key is recommended but not required.
See Obtaining an API key
In Api version 2 a key is required to run gmap out of localhost
in the API v3 a key is not required

Google Maps API, without Login

I have google maps api on my application and I would like to create new maps on google map from my application. I know that this can be done, but you have to login and than data is send to you account. What I would like to do is to send data to just one accout, so that my users will not need to sign in to google.
If you are referring to API keys, starting with V3 you can access the Google Maps API without a key (it's no longer required).
http://code.google.com/apis/maps/documentation/javascript/basics.html#Welcome
Note: This version of the Google Maps JavaScript API no longer needs API keys!

Categories

Resources