The default Mendix search functionality for datagrids can not be extended to the GoogleMaps widget as far as I know. A listen-to-grid (so only one record) will work, though.
To get this working for a selection I created something similar to what Chris is mentioning.
Steps to take;
- In this context object SearchCommand, you add all the attributes of the Location object you want to be able to search on;
- Add an association from the SearchCommand object to the GoogleMaps.Location object;
- Add a Microflow that, based on the filters set by the end-user, retrieves the correct GoogleMaps.Location objects and associate them to the SearchCommand object. This will be the Microflow to add on a button in the DataView of the SearchCommand object, triggering this custom search;
- At the end of this Microflow add a refresh on the SearchCommand entity;
- Add the GoogleMaps widget with above mentioned XPath: [Location_SearchCommand=[%CurrentObject%]]
- In the GoogleMaps widget, make sure it 'listens' to the entity refresh mentioned in line 4 above.
Good luck!