Google map custom view tag

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ddgyemen
User
Posts: 4

Google map custom view tag

Post by ddgyemen »

Dear All,

I am trying to use the ready google map custom view tag shipped in PHPMaker but I don't see a tutorial on how to use this tag.
I have a database that stores beneficiaries data of trainees. we store their province, GPS coords. [lats and longs ] in two columns and the date of training. we also store the gender type and age.
I want like to produce an interactive and dynamic map in PHPMaker 11 where it automatically shows the locations of our beneficiaries on the map with a small popup notification that shows the name of the location, number of people trained, if the marker is clicked!

Can any one help me on how to do this in PHPMaker?

Many thanks,

Best,
Ansi


mobhar
User
Posts: 11745

Post by mobhar »

You may see the example of usage of Google Maps custom view from the demo project that provided by PHPMaker.

Click on the "Address" field of "customers" table, then from "View Tag" pane, scroll to the bottom, you will see "Custom View Tag" section.


ddgyemen
User
Posts: 4

Post by ddgyemen »

Thanks a lot Mobhar for your help.
I tried to look at the address field of the customer table but the Google map is not used in the Google custom view tag.
The coordinates of the places I want to plot or mark is unknown to Google unless I use the lats and long and not as an address like (NY, 613) for instance.

Any help?

Thanks,
Ansi


laurief
User
Posts: 18

Post by laurief »

Hi

Not sure what stage you are at? From a bit of experimenting, this is the way I use the tag:
You can select either the table name if you want to put a map of all locations above the table list view OR select a field to use that field to display a single location in a record view page. Once you have selected either table name or a field, you click the dropdown in the custom view tag and tick "Google Maps".
Then choose "settings" and enter the details you want - use the "xxx_field" (click the dropdown) to use data from the database.
The "Description_field " is used for the info popup.
In settings, select the show all markers and view on top to have a map of all markers in a list view page....
I use a float8 field for the lat and lon fields.

Cheers


ddgyemen
User
Posts: 4

Post by ddgyemen »

Thanks Laurief for the help
I will give it a try and get back to you if I need more help!
Thanks again,

Ansi


danielc
User
Posts: 1601

Post by danielc »

If you use a single map to display, you can use your own user style to center. See HTML Settings in help file how to add user style. View HTML source, here is the example:

div#ewGoogleMap {
margin: auto;
}


Post Reply