07 - Create Adress field to locate Estate and add map

Voting
Average rating
  • 1
  • 2
  • 3
  • 4
  • 5
89 07 - Create Adress field to locate Estate and add map /realestate/demoj4/how-to-do-same-site/89-07-create-adress-field-to-locate-estate-and-add-map.html
Click to subscribe
Last modified
Tuesday, 29 March 2022

This field is a powerfull system to create an autocomplete adress field :

  • API place
  • Display address
  • Display direction link
  • Display map
  • Display marker
  • 2 map provider for display, Googlemap and openstreetmap

And its completly compatible with Flexicontent map module to display multipoint map and dynamique search system !

At first you need API code, Googlemap ApI or Aloglia API (free) for Place api (auto-complet address in backend)

  1. Create field with Address name
  2. Select internationnal Address type field
  3. Assign to your type
  4. Set country if you want to limit it in backend

 

Now you need to choose map provider

And you can check how user can set address in backend

  1. Allow user to edit lat and lon (recommanded to allow user to correct false address)
  2. Set if address field a simple texte area or X fields
  3. Choose this if you want to allow user to select marker for address
  4. Set the root folder where you put icons
  5. Set size of map in form

In viewing tab you can set how field was display

  1. Set if Address is display and when
  2. Choose format of addess
  3. Display direction button
  4. Choose when map is displayed
  5. Chosse type of map (image map is better for performance when you load many map in same page)
  6. Choose type of displayed map
  7. Set size of map
  8. Choose if map is before or after address
  9. Choose map style via a json code

now your user can easly add address with localisation and custom marker

  • Tags
    individual marker | adress | algolia | openstreetmap | googlemap | field configuration
  • Categories
    Tutorial