Closed setterlee closed 1 year ago
Hello @setterlee 👋, and thanks for submitting this issue. I've got a few clarifying questions regarding what you're seeing in your (or your client's) app relative to the AWS Location "try it!" section that you referenced.
I was able to see some minor differences in the search results when creating a Vue app that used your code above (using default settings), but I believe the "Place Index" example within the AWS Console you linked has a few additional options configured as a demo.
It does appear that if you're zoomed in enough when using the Location Search AND you provide minimal text to search (such as "Fort P" in your example), the returned array of results doesn't fill to the MaxResults that is set.
Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment back with any previously requested information and we'd be happy to re-open the issue.
Thank you!
Before opening, please confirm:
JavaScript Framework
Vue
Amplify APIs
Geo
Amplify Categories
geo
Environment information
Describe the bug
My client warned to me that when he try to search "fort p" on the map, he just see one option. Comparing with the behavior at AWS Location "try it!" section I noticed that in that place "fort p" show more than one...
Comparing the Geo.searchByText (just filtering countries to USA and setting maxResults to 6) with the createAmplifyGeocoder control show the same result, just one option.
Expected behavior
We expect that the result looks like the AWS Location "try it!" section
Reproduction steps
The steps decribed at Location Search section in Amplify CLI Docs
import { createMap, createAmplifyGeocoder } from "maplibre-gl-js-amplify"; import maplibregl from "maplibre-gl"; import "maplibre-gl/dist/maplibre-gl.css"; import "@maplibre/maplibre-gl-geocoder/dist/maplibre-gl-geocoder.css"; import "maplibre-gl-js-amplify/dist/public/amplify-geocoder.css"; // Optional CSS for Amplify recommended styling
async function initializeMap() { const el = document.createElement("div"); el.setAttribute("id", "map"); document.body.appendChild(el);
}
initializeMap();
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
package.json.txt