danielantelo / AddressableBundle

Symfony2 bundle which facilitates making entities addressable and geo location aware. It includes a map form type to set address by searching in a google map.
6 stars 11 forks source link

JS error on include_current_position_action => false #10

Closed virtualize closed 6 years ago

virtualize commented 8 years ago

If the include_current_position_action option is set to false, the Javascript throws this error: address_map.js: 58 Uncaught TypeError: Cannot set property 'onclick' of null

When enabled, its working fine. This is my setup:

->add('address', AddressMapType::class, array(
    'include_current_position_action' => false,
    'default_lat' => 47.4161188,
    'default_lng' => 8.5506379,
    'google_api_key' => $this->getConfigurationPool()->getContainer()
        ->getParameter('google_maps_api_key'),
    'country_field' => array(
        'name' => 'country',
        'type' => CountryType::class,
        'options' => array(
            'preferred_choices' => array('CH')
        )
    ),
))
danielantelo commented 6 years ago

Fixed.