Knowledge Base - Main documentation

 

Publishing a map 

The final step is to publish your map. You can do this in two ways: As a core joomla component page, or as a joomla module.

Tutorial Step 5

a) Publish map as component:

In this case the map is displayed as page content (as joomla main content).

Create a new joomla menu item inside the menu of your choice (ex:”Main menu”).

As the “Menu Item Type”, select “Geocode Factory 5” and then “Maps and markersets”

Next, add a Menu Title (ex:”My map”) and select the map you want to display (ex:”My map”). The options you have here are taken from the list of maps found in your GF “maps manager”. In the following image there is only one option available.

Finally save your new menu item.

b) Publish map as module:

The map module is very useful for displaying a map at same time with another component. The typical example is to display the map next to a directory component, and to set the related markerset with the auto-category feature enabled. In this case, the markers that will be displayed will be entries belonging to the categories you are currently browsing only (and child categories as well).

Another example is to publish the module on a detailed page view, of either a directory entry or a user’s profile. In this case, the module will display the currently viewed marker for this item (or markers if the entry/user has multiple addresses).

Zoom

The module zoom is based on the map settings or can be forced by the module. This is especially useful when the module is used for the detailed view context where you can select the level you prefer..

Show/hide depending on context

The maps can be hidden in several situations. The typical example is when you use two different maps in a directory component:

  • a) The first map used for the “auto-category” context of a directory as discussed above. The map here displays the markers depending on the categories one is browsing (category view of the component).
  • b) And another map on the current entry view (the details view) where we want to load a different type of map (for example, satellite view) with different markersets (ex: loading only the current marker and the 5 closest markers in a given radius).

In this case you need to display 2 different occurrences of the module in different component views (category and details views respectively). But both modules are published on the same page (the directory component menu link). So you need to define more advanced settings to hide or show the map depending on the view in this case. You can work with the url parameters, and define the behaviour of the module in each case based on the component tasks. So to hide the first map in details view of the component, you add “task=viewdetail”. 

Applies To

Geocode Factory 5