Nearby Search | Google maps api - google-maps-api-3

I am using Google Places API Web Service, specifically nearbysearch to search for places around me. However, some of the places names that I get are in languages other than English, some are Chinese and Arabic, I tried to include language=en in the url. However, with no luck. It is worth mentioning that same places names are in English if I look them up in www.google.com/maps
The url I am using:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=25.1677738,55.4030409&radius=500&type=food&language=en&name=&key=YourKey
Please note that I have removed my key from the url.
This is part of the result I am getting with Arabic place name
{
"geometry" : {
"location" : {
"lat" : 25.167926,
"lng" : 55.4015231
}
},
"icon" : "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
"id" : "328ca6a7bb4dd48eb44215ed32fa5676fca8e462",
"name" : "سوبر ماركت بوماز ٢٤ساعة",
"place_id" : "ChIJlcEHXrVmXz4RJH7IVn7Rps4",
"reference" : "CoQBfwAAAI8pnOqGRA6E71Mmztnk8ueSA7kS9bn5idY3S5V0_D_JZP2F9knryHUervQXA_RZL3-9KZJH55NrX0dz4p1R1GUQbGz4jXGoDQMJemisTLpiu41dm8-wgZT6XzXsDUeLLo6QbENam3hM2gCXPzpjTu4F7GsV4t4bIX5FhDQ-SufVEhDYboMkA1reMj20kM4AAvzGGhStwclS0fE9rWQkn5LTUcxiio-3vA",
"scope" : "GOOGLE",
"types" : [
"grocery_or_supermarket",
"food",
"store",
"point_of_interest",
"establishment"
],
"vicinity" : "U2 - Italy U17 - Dubai"
}

Looked around the community for a while and found this a post that is regarding the inconsistency in the language used in Google Places API results. And as per the answer, it seems that it is actually a correct behavior, from the answer:
Even if you specify a language, it will return the response in that language only if there is one available, if not it will return the response in the language it was originally entered in.
There are workarounds included in there that I think that would be helpful.

Related

Issue with manual implementation of Enhanced conversions for Google Ads via GTM

I'm having issues with implementation of Enhanced conversions in Google Ads. Would be really appreciative if someone could give me some pointers to the right direction or any suggestion regarding what to try.
The error message I'm receiving is the one below:
"User address data field is incorrectly formatted
Make sure user address is correctly formatted and hashed using the SHA-256 algorithm. See instructions and double-check your setup."
I've been following the instructions specified here: https://support.google.com/google-ads/answer/10172785?hl=en#zippy=%2Cenable-enhanced-conversions-in-google-tag-manager-and-create-custom-javascript-variable
The part regarding "hashed using the SHA-256" appears to be incorrect, since Google in another part of their documentation say that the data shouldn't be se sent hashed, unless you're using the Google API (which is not the case here).
The only value not available in the data layer on the conversion page is "street" so I've left that field out entirely. The other attributes should be present in the data layer.
Which steps have I taken?
Step 1 - Selected "Include user-provided data from your website" in the existing Google Ads pixel/tag.
Step 2 - Configured the variable type "User-provided data" and selected "Code" as type
Step 3 - The data source has the below code:
function () {
return {
"email": {{data.email}} ,
"phone_number": {{Telephone}} ,
"address": {
"first_name": {{First Name}} ,
"last_name": {{Last name}} ,
"city": {{City}} ,
"postal_code": {{zipCode}} ,
"country": {{Country ID}}
}
}
}
Can anyone see if their perhaps is something in the code that's not correct or if their could be any other possible reason why the enhanced conversions aren't collecting data?
Thanks in advance!
I've looked in to using the CSS selector method, but the conversion page only has email data.
Also tried "Manual configuration", but this requires all values to be present, otherwise you can't save (e.g. if "Address" is missing, you can't save)
I've also made test purchases and from what I can see, the conversion tag is picking up the attributes for enhanced conversions correctly.

WSO2 APIM iframe options

We'd like to promote some exposed APIs from the API manager on a different portal. The APIM Store even has an "Embed" button on the API overview providing an HTML snippet to include an iframe code into the page (refering the /store/apis/widget page).
However - the widget (and according my experience - any response) of the APIM store includes the "X-Frame-Options" set to DENY, effectviely prohibiting use of iframe.
Is there any way to allow the widget into an iframe?
Edit: seeing following post -
I have feeling that I won't be able to anything about the X-Frame-Options header ( https://docs.wso2.com/display/Security/Security+Advisory+WSO2-2016-0092 ), we could remove the header on the proxy server level, but I woudn't like to compromise security
If you want to display store jaggery app within an IFrame, you need to modify the 'jaggery.conf' file located in the <APIM_HOME>/repository/deployment/server/jaggeryapps/store/ directory. There you have to add antiClickJackingOption and antiClickJackingUri(URI that should be allowed) related parameters into the security filters section as below.
"filters":[
{
"name":"HttpHeaderSecurityFilter",
"class":"org.apache.catalina.filters.HttpHeaderSecurityFilter",
"params" : [
{"name" : "hstsEnabled", "value" : "false"},
{"name" : "antiClickJackingEnabled", "value" : "true"},
{"name" : "antiClickJackingOption", "value" : "ALLOW-FROM"},
{"name" : "antiClickJackingUri", "value" : "http://napagoda.com/*"},
{"name" : "blockContentTypeSniffingEnabled", "value" : "false"}
]
},

Inconsistent results, maps.googleapis.com/maps/api/geocode

http://maps.googleapis.com/maps/api/geocode/json?address=rome&sensor=false
OR
---------------------------------------------------------roma-------------
http://maps.googleapis.com/maps/api/geocode/json?address=Vatican%20Museum&sensor=false
If the query is Rome or Roma The result for
"types" : [ "locality", "political" ] is "long_name" : "Rome",
If the query is "Vatican Museum" The result for
"types" : [ "locality", "political" ] is "long_name" : "Roma",
and not Rome as it should be.
Is it bug of the service? I try to use language=en but it not helping.
This is complete conjecture so feel free to disregard out of hand, but my best guess is that it has to do with the address that the Maps API has stored. For instance, if you (or I, at least) try searching for the Vatican Museum in Google Maps, no result is found and the suggestion points to the Italian version. If you do a similar query for the Colosseum, you can see that your approach of using the language parameter does appear to be correct:
English
http://maps.googleapis.com/maps/api/geocode/json?address=Colosseum%20rome&sensor=false&language=en
Italian
http://maps.googleapis.com/maps/api/geocode/json?address=Colosseum%20rome&sensor=false&language=it
I'll take a look around for some more information corroborating this, but my best guess is that being able to toggle between languages depends on data for that language being available, and in this case only the Italian version is present

fetching all the Restaurants, supermarkets, malls etc. nearby using the Google Maps Api

I'm new in iPhone Development. I'm creating an application in which i need to fetch all the Restaurents, supermarkets, malls etc. in the nearby location using GoogleApi. Im using following link to find the venue:
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=grocery_or_supermarket&sensor=true&key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI
But I'm getting the following message:
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
Please help.
Any solution will be appreciated.
Thanks in advance.
"Access denied" is coming because the key(AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI) you are using is not valid.
You have to register your project on on Google and have to generate unique key from this link.replace the generated key with the key in your link, then this will work fine.
If you have any other query let me know.

Write a Freebase MQL query that gets everything back about a given topic?

I want to write a query that gets back everything that is known about a topic (only needs to be one level deep.
When working in the Freebase MQL Editor they give the following example for "Everything we know about Jimi Hendrix":
{
"*" : null,
"name" : "Jimi Hendrix",
"type" : "/music/artist"
}
The problem is that the query is bound to a type "/music/artist" and is only getting back properties that relate to that type. If you change the query to use a different type you get an entirely different result set.
{
"*" : null,
"name" : "Jimi Hendrix",
"type" : "/people/person"
}
How can I write a query that really gets back everything that Freebase knows about Jimi Hendrix?
To do this you'll need a more advanced type of query that looks at the underlying links (/type/link) that make up the Freebase graph. Each link has a source, a target and a property assigned to it and they can be queried like this:
[
{
"master_property" : null,
"source" : {
"id" : "/en/jimi_hendrix"
},
"target" : null,
"target_value" : null,
"type" : "/type/link"
}
]
These are called the outgoing links and represent most of the values that you usually see in the Freebase UI but you can also swap the source and target to get a list of incoming links links this:
[
{
"master_property" : null,
"source" : null,
"target" : {
"id" : "/en/jimi_hendrix"
},
"type" : "/type/link"
}
]
These links include properties on other topics that refer to Jimi Hendrix as their value and these values are not all shown on the Freebase Jimi Hendrix page to keep the volume of information to a manageable level.
The Freebase Topic API might be what you're after:
http://www.freebase.com/experimental/topic/standard?id=/en/jimi_hendrix
The Topic API will grab all properties directly related to a topic in the graph. The API wraps a series of MQL queries to get all the data and outputs in JSON.
Google "Freebase Topic HTTP API" for further information.
After a while, we figured this is a typical use case, so we introduce a whole new API for doing this:
http://www.freebase.com/docs/topic_api
This will get you all the properties from the above queries, as well as mediators and other goodies.
Note that if you want all the properties from ALL the topics in Freebase, you should be using the data dumps and not the run-time query language (it will be many times faster).

Resources