51 Posts
morhinio
9 years ago
Topic

Hello,

I have created a Form & Content Type with following fields:

  • street
  • city
  • zipcode
  • country
  • longitude
  • latitude
  • geolocation (address to coordinates)



If I save the content type, the latitude and longitude data are stored in the database.

Now I use the the seblod importer with the following csv fields:

  • street
  • zipcode
  • city
  • ...

The import works fine. But the latitude and longitude data are not stored in the database.

Only if I save the content in the backend again, the latitude and longitude data are stored in the database.

Is there a workaround, that I get the geo data during the import?

Get a VIP membership
9 years ago
1
Level 1

Hi morhinio,

the impprter don't take care of what you are importing.

If your CSV file is well formated, the content must be imported.

Be sure to have the two columns "longitude" & "latitude" in the CSV file with the good header.


regards.

Lionel

51 Posts
morhinio
9 years ago
0
Level 2

Hello Lionel,

my problem is not the import. That works fine.

After the import the longitude & latitude data in the database are: 0.00000000

The longitude & latitude data (address to coordinates) should be generated automatically during the import.

9 years ago
1
Level 1

I morhinio,

I understand, but it's not implemented.

Google map geocoding have some limitations : 

Users of the free API:
  • 2,500 requests per 24 hour period.
  • 5 requests per second.

So depending on the number of items.

The only way you have is to calculate coordinates for each points before the import with a ajax script to stay in te limitation of 5 request per seconds.

To geocode more than 2500 points by 24 hours you must use multi google accounts with a differents Api key.

Have a look to the google API


Regards.

Lionel

51 Posts
morhinio
9 years ago
0
Level 2

That's what I thought as much.

Thanks for your help.

Get a Book for SEBLOD