Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть How to store Addresses and Locations in Drupal 7

  • WebWash
  • 2015-10-14
  • 3400
How to store Addresses and Locations in Drupal 7
Drupal (Software)
  • ok logo

Скачать How to store Addresses and Locations in Drupal 7 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно How to store Addresses and Locations in Drupal 7 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку How to store Addresses and Locations in Drupal 7 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео How to store Addresses and Locations in Drupal 7

By: Ivan Zugec
http://webwash.net |   / webwashnet  

Modules:

Address Field (http://drupal.org/project/addressfield) (7.x-1.0-beta4) (7.x-1.0-beta4)
Geofield (http://drupal.org/project/geofield) (7.x-1.1)
geoPHP (http://drupal.org/project/geophp) (7.x-1.7)
Geocoder (http://drupal.org/project/geocoder) (7.x-1.2)
Ctools (http://drupal.org/project/ctools) (7.x-1.3)

Resoures:

geoPHP (github.com/phayes/geophp)

Transcript:

In the good old Drupal 6 days, when you had to store an address and have that address converted into a latitude and longitude you would use the Location module. If you wanted to display a Google Map on your website, you would use the Gmap Module. In Drupal 7 the landscape has changed and now you have a lot more options than just using the Location module.

A lot of the functionality that the Location module gives you can be found in four separate modules: Address Field, Geofield, geoPHP and And Geocoder.

Address Field allows you to store postal address. Geofield allows you to store geographic data in a number of formats, like longitude and latitude. geoPHP provides Drupal integration with the geoPHP library. And Geocoder, this module is used to convert a postal address into geographic coordinates.

In this video I'll show you how to setup the modules mentioned, to allow users to enter in an address and then have a map displaying the location of the address.

You may think that installing four modules to handle addresses and locations is a bit too much.

This method does give you some flexibility. Let's say, for now, you only need to store addresses, but in the future you may want to store coordinates as well like longitude and latitude.

Then, just setup Address Field to handle addresses for now and Geofield later.

Before we get started there are a few modules we need to download. Go download and install the following modules: Address Field, Geofield, geoPHP and Geocoder. You'll also need to download Ctools for Address Field and Geocoder.

Now that we have downloaded and installed all the required modules, let's go ahead and setup our fields. For this video I have created a content type called Venue, which I'll use throughout this video. But you can use Article or your own content type.

Go to Structure, "Content types" and click the "manage fields" link on a specific content type.

Enter Address into the Label field. Venue address into the machine name field. Select "Postal address" from the "Field type" drop-down and "Dynamic address form" from the Widget drop-down.

Click on the "Save field settings" button. Configure the address field if you need to, then click on "Save settings" to return to the "manage fields" page.

The address field that we just created, will be used to store a postal address. The next field we'll create will store the coordinates for the entered postal address, we'll use the Geofield module for this field.

So enter in Location as a label. Venue_location as the machine name. Select Geofield from the "Field type" drop-down list, "Geocode from another field" as the widget. Then click on Save, and click on "Save field settings".

Change the "Geocode from field" drop-down to Address. Scroll to the bottom and click on "Save settings". Now that we have everything setup, let's test the fields. Go to Content then "Add content" and I'll click on Venue. And enter in a proper address, then click on Save.

So how does this all work?

First, the address field is used to store an address that's it.

The magic happens with GeoField and Geocoder. When we created the field we used a widget called "Geocode from another field".

When you create piece of content with an address, Geofield grabs the address from the address field and uses the Geocoder module to converts the address into longitude and latitude coordinates and stores the coordinates in the location field that we created.

In the next part, we'll use the coordinates to display a map via a field formatter.

Currently the location field is just displaying coordinates, that's a bit useless. Let's display a map interface instead. Geofield ships with a sub-module called "Geofield map". This sub-module allows you to display a map via a field formatter.

So go ahead and enable the module, once enabled go to Structure, "Content types" and click the "manage display". Select "Geofield Map" from the Format drop-down and click on save.

You can configure the formatter by clicking on the cog wheel. In the formatter settings you can adjust a bunch of stuff like width, height, zoom level or map type and more.

Now if we go back to our content page, we should see a map. And there you go

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]