Google Maps

0
Hi, The App Store has two Google Maps modules. It seems to me that "Google Maps Module v1.0" is the most complete, as it comes with a module etc, so ready to use. Is this the right one to chose, and how can I make it show just a single address? It shows all addresses in the Location table. I have tried millions of XPath options, but I am quite lost now. Any suggestions are welcome. Regards, Paul
asked
4 answers
1

The AppStore has the Google Maps Widget (2.0 as latest version), which is just the widget you can put in your project. It also has the Google Maps Module (1.0 being the latest), which is a module package to get started with the Google Maps widget, including a java action which converts addresses to the latitude/longitude which the latest version of the widget uses. Assuming you need this functionality and want to use addresses, I think you will want to indeed get the module.

I have not used the Maps widget myself yet, but according to the documentation you should be able to focus on a single address using the CurrentObject constraint on the widget.

answered
1

Issue fixed. My entity company inherits from Location, the standard entity supplied by the module. In the popup dataview, which shows the full address of the selected company and the map, I use Location as data source where "[id = '[%CurrentObject%]']" is the XPath constraint.

answered
0

Place a data view under the Location datagrid. Set the entity to Location and do not fill with content. Place a table with one cell and place the google widget inside. Let this data view listen to the above datagrid. Now you will see all the locations when you open this form and when you select one location it will switch to that single location.

If you used a correct xpath constraint in the properties of your form it should only present those locations. But more info is needed on what you entered in the xpath constraint.

answered
0

Thank you the responses. To explain my specific case: I have a grid on a page showing company names with their city and country. Entity company is a specialization of Location, so it inherits the right attributes for Google Maps. On the grid's toolbar is a "View address" button, which shows the full address and the Google maps widget in a popup. This widget is the one that I have to tell to show just the specific address, and not all.

The popup form is a dataview on Company, showing the various street, zipcode, etc fields. The widget is currently not in this dataview. I haven't tried it to make it part of the dataview yet, due to lack of time.

Based on the description above, do you have any suggestion if this setup, of using the widget in a popup, will work anyway?

answered