Zh OpenStreetMap Article Overview Map

From Documentation
Jump to navigation Jump to search


By using article overview map you can create map which contains placemarks for your articles, and allow to go to article details from your map.

Article Fields

In joomla you can create your own fields and enter it values when you create or edit map.

First of all we need create Field Group. All fields for extension we will associate with this group.

To create Field Group in administration panel go to Content->Field Groups.

Create new group

OSM Article Overview Module-FieldGroup.png

Save it. Now we have our group with name Plcemarks

OSM Article Overview Module-FieldGroupList.png

Lets create fields.

Create first field Lat for latitude

OSM Article Overview Module-Field-1.png

The same way create field for longitude.

We don't set it required because not all articles can have this attributes.

The result list is

OSM Article Overview Module-FieldList-1.png

Article attributes

Go to article details. You can see new tab with name Placemarks

OSM Article Overview Module-Article-1.png

Enter values for latitude and longitude.

Article Overview Map Module

Now we will create module and set all settings to show map.

OSM Article Overview Module-Module Settings-1.png

OSM Article Overview Module-Module Settings-2.png

OSM Article Overview Module-Module Settings-3.png

We have to define

Map - it is exist map, all settings for it will be used (include overrides) to display data.

Field Group, Latitude, Longitude - group title, and fields titles for latitude and longitude.

In this example I added restriction rule to get articles only for category 13

If we use field Marker like as Icon File: we need to define defaults.

It is in Default values block.

It means if we don't set icon name for an article (it is below) the default value will be used (for case predefined icons).

Set module position, save it.

Our map will be like

OSM Article Overview Module-Map-Default.png

By default we can press placemark to show popup and have link to article in popup toolbar.

OSM Article Overview Module-Map-Popup-1.png

Custom icon for article

Lets add new attribute to article which will hold icon name.

Create new field in our field group

OSM Article Overview Module-Field-2.png

Now we have new list of our fields

OSM Article Overview Module-FieldList-2.png

Add to article value for icon

OSM Article Overview Module-Article-2.png

Add icon definition to module

OSM Article Overview Module-Module Settings-4.png

In addition to this lets change some parameters (do not show GPS data and article link)

And now result is

OSM Article Overview Module-Map-2.png

Popup content

OSM Article Overview Module-Map-Popup-2.png