Assigned
Status Update
Comments
ca...@google.com <ca...@google.com> #2
i am using these dependencies for the map
// Maps SDK for Android KTX Library implementation 'com.google.maps.android:maps-ktx:3.0.0'
// Maps SDK for Android Utility Library KTX Library
implementation 'com.google.maps.android:maps-utils-ktx:3.0.0'
implementation 'com.google.android.gms:play-services-base:18.5.0' implementation 'com.google.android.gms:play-services-basement:18.5.0' implementation 'com.google.android.gms:play-services-maps:19.0.0'
and also getting some map sdk error as well dab File created: google_maps_sdk_crash dab File created: _google_maps_sdk_crash_count_1 dab Couldn't create marker: google_maps_sdk_crash dab File created: _google_maps_sdk_crash_count_2 dab Marker deleted: _google_maps_sdk_crash_count_1
Description
the documentation says: "Use the includedPrimaryTypes parameter to restrict results from a request to be of a certain type as listed in Table A and Table B."
The following request with includedPrimaryTypes=["geocode"], returns results not matching geocode (e.g. second result has types = airport,establishment, point_of_interest)
curl -X POST -d '{"input": "Paris","includedPrimaryTypes": ["geocode"],"locationBias": {"circle": {"center": {"latitude": 45.8,"longitude": 2.8},"radius": 1500.0}}}' -H 'Content-Type: application/json' -H "X-Goog-Api-Key: <key>
{
"suggestions": [
{
"placePrediction": {
"place": "places/ChIJD7fiBh9u5kcRYJSMaMOCCwQ",
"placeId": "ChIJD7fiBh9u5kcRYJSMaMOCCwQ",
"text": {
"text": "Paris, France",
"matches": [
{
"endOffset": 5
}
]
},
"structuredFormat": {
"mainText": {
"text": "Paris",
"matches": [
{
"endOffset": 5
}
]
},
"secondaryText": {
"text": "France"
}
},
"types": [
"political",
"geocode",
"locality"
]
}
},
{
"placePrediction": {
"place": "places/ChIJW89MjgM-5kcRLKZbL5jgKwQ",
"placeId": "ChIJW89MjgM-5kcRLKZbL5jgKwQ",
"text": {
"text": "Aéroport de Paris-Charles de Gaulle (CDG), Roissy-en-France, France",
"matches": [
{
"startOffset": 12,
"endOffset": 17
}
]
},
"structuredFormat": {
"mainText": {
"text": "Aéroport de Paris-Charles de Gaulle (CDG)",
"matches": [
{
"startOffset": 12,
"endOffset": 17
}
]
},
"secondaryText": {
"text": "Roissy-en-France, France"
}
},
"types": [
"establishment",
"airport",
"point_of_interest"
]
}
},
{
"placePrediction": {
"place": "places/ChIJLTyNDYxv5kcRbtc9TZBbD_o",
"placeId": "ChIJLTyNDYxv5kcRbtc9TZBbD_o",
"text": {
"text": "Paris Beauvais Airport, Route de l'Aéroport, Tillé, France",
"matches": [
{
"endOffset": 5
}
]
},
"structuredFormat": {
"mainText": {
"text": "Paris Beauvais Airport",
"matches": [
{
"endOffset": 5
}
]
},
"secondaryText": {
"text": "Route de l'Aéroport, Tillé, France"
}
},
"types": [
"establishment",
"airport",
"point_of_interest"
]
}
},
{
"placePrediction": {
"place": "places/ChIJHTtq-rF15kcRIoTbQ9feeJ0",
"placeId": "ChIJHTtq-rF15kcRIoTbQ9feeJ0",
"text": {
"text": "Aéroport de Paris-Orly (ORY), Orly, France",
"matches": [
{
"startOffset": 12,
"endOffset": 17
}
]
},
"structuredFormat": {
"mainText": {
"text": "Aéroport de Paris-Orly (ORY)",
"matches": [
{
"startOffset": 12,
"endOffset": 17
}
]
},
"secondaryText": {
"text": "Orly, France"
}
},
"types": [
"establishment",
"airport",
"point_of_interest"
]
}
},
{
"placePrediction": {
"place": "places/ChIJgwVOTCdy5kcREBuUaMOCCwU",
"placeId": "ChIJgwVOTCdy5kcREBuUaMOCCwU",
"text": {
"text": "Paris 13, Paris, France",
"matches": [
{
"endOffset": 5
}
]
},
"structuredFormat": {
"mainText": {
"text": "Paris 13",
"matches": [
{
"endOffset": 5
}
]
},
"secondaryText": {
"text": "Paris, France"
}
},
"types": [
"sublocality_level_1",
"geocode",
"political",
"sublocality"
]
}
}
]
}
Is it an expected behavior?
Thank you!