Google Maps - lat, long for each record

Thanks, I did it. But how can I indicate where the separate lat and lon fields are?
I have to indicate those fields so that I can do the transformation to a single field
 
It doesn't work. When I click Run, I obtein this error (I have upload an image)
The error say: "Maximum execution time of 120 seconds exceeded in C:\wamp64\www\fom\libraries\cms\layout\file.php on line 600"
I set "Row Limit" in scheduled task to 55000 (record number of my table)
If I set "Row Limit" to 100 the error doesn't appear but in the new field is not the coordinates, the field only has NULL values (the data type of the field is varchar(255) (??)
 

Attachments

  • error_run.png
    error_run.png
    75.8 KB · Views: 105
Last edited:
As you can see in the "Row limit" tooltip
By default Fabrik will select all rows in the selected list for cron processing, subject to any pre-filters, but NOT subject to any pagination limits. This can result in memory and execution time problems on larger tables. To place a hard limit on the number of rows selected for processing (ordered as specified in your list setting), set this Row Limit."
With row limit = 100 it will only process 100 records, maybe you didn't select the processed ones while looking for the coordinates?
 
No, while I looked for the coordinates I wrote a SQL sentence (where field_coordenates IS NOT NULL) and all records were NULL. The 100 record (row limit=100) were NULL. The scheduled task didn't work. What can I do? A message appears "100 records updated" but it doesn`t update the records.
Thanks. Additionally, is it normal than the he data type of the field is varchar(255) instead of numeric?
Sorry for my english, I hope you can undertand me...
 
I just tried, it's definitively working (although it doesn't respect the "Geocode when" setting; in case of lat/lon to map it's geocoding always).
Check your settings in the scheduled task plugin (also called cron plugin sometimes).

The format is "(lat,lon):zoom", so it can't be numeric.
 
If it's a one time thing, you could just do it yourself in phpMyAdmin (or whatever), run a query like ...

Code:
UPDATE mytable SET map_field = CONCAT('(', lat_field, ',', lon_field, '):4')

Obviously replace mytable, map_field, lat_field and lon_field with your table and field names, and 4 with whatever zoom level you want.

-- hugh
 
Ahhhh!!! I understand!!! But then, why is it necessary run geocode scheduled task? I thought that did this concatenation.
I think that something I don't understand...

Other question... if I insert new record, can the user moves in map and fix the marker in a position, and then insert these coordinates in the field (lat,lon:zoom). This was perfect...
 
But then, why is it necessary run geocode scheduled task?
It is not necessary. You can do it one way or the other.
if I insert new record, can the user moves in map and fix the marker in a position, and then insert these coordinates in the field (lat,lon:zoom).
That's what the googlemap element is for; the user can move the marker (or - depending on your settings and other elements - he can add an address and "geocode") and the googlemap element is storing this position as (lat,lon):zoom
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top