PrestaShop Developer Conference
PrestaShop Developer Conference
Hybrid format! Paris, France & Online - November 19, 2025
Let's talk code, commerce and open source.

GeoCoordinatesType

This form class is responsible to create a geolocation latitude/longitude coordinates field.

Type options

Option Type Default value Description
label_longitude string Longitude Longitude label
label_latitude string Latitude Latitude label

Required Javascript components

None.

Code example

Add GeoCoordinatesType to your form.

<?php
// path/to/your/CustomType.php

use PrestaShopBundle\Form\Admin\Type\GeoCoordinatesType;

class CustomType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('coordinates', GeoCoordinatesType::class)
        ;
    }
}

Find a complete implementation in the demosymfonyform module.

Updating the coordinates

The GeoCoordinatesType renders two input fields that must be provided when updating the value:

  • latitude - the north-south position
  • longitude - the east-west position

Preview example

GeoCoordinatesType rendered in form example