Knowledge Base - Advanced Features Guide

Introduction

This article speak about advanced features of Geocode Factory, it's strongly recommended to read the Getting started guide before.


Working with directories and categories

Introduction

This article explains how the Geocode Factory works with categories. Geocode Factory can draw maps, and populate them with data from different products (Community Builder, Sobi2, Sobipro, Mosets tree, ...). For directory components there are some special requirements.

Geocode-Factory-Markerset-two

Each directory entry needs to be geocoded (from the address ... city, street, ...). This means each directory entry needs to have latitude / longitude associated with it. Some components are capable of geocoding entries during the creation process, some need a 3rd party plugin. In addition, Geocode Factory can batch geocode all entries (or all non geocoded entries), from the backend.

Geocode Factory works with directory components like : Sobipro, Sobi2, Adsmanager, Joomla! content, GPSTools and Mosets tree. We provide many features related to these components :

  • filter the map markers based on the current category
  • display the markers icon based on the current category
  • display the markers icon based on the entry
  • center the map on current entry in detailed view

Of course the Geocode Factory maps can be used for standalone maps as well, and include all existing markers from these directory components (and/or community profile components, and/or event components).

Add a map in component category

It's possible to have a map displayed within a directory component as a contextual map. The goal of the present chapter is to create a Geocode Factory map displayed within your directory listing page. To display a Geocode Factory map into the directory context, we need to publish the map as module. See the module related articles from the getting started guide. In summary you need to :

  • Create a basic map in Geocode Factory. Don't forget to add a basic template (at least [map])!
  • Setting the map center as “all markers” option is a good idea here, then in all categories, the map will show all available markers.
  • Create a basic markerset in Geocode Factory without filters or radius (you can add them later). Don't forget to add something to the template like [TITLE] so the bubble has something to display.
  • Link the markerset to the map
  • Test your map to be sure it displays all your markers
  • Create a Geocode Factory menu link in Joomla! for testing. Select the show maps by it’s ID, and select the map.
  • The map is shown on front-end and you see all markers.
  • Configure the "Geocode Factory - Show Map module"
  • Set the created map in the module parameters
    • publish the module on your directory pages (sample : on the Sobipro pages)

Now you will see a map on your directory home (and other) pages. This is good, but in this case we want to filter the map to show only the markers from the current category.

Filtering the entries (markers) by category

Now we can filter the markers based on the categories. There are 2 methods. Either method allows you to mix the markersets from directories with markersets from other types of extensions. (Jomsocial profiles, etc). This means, you can display all users' profiles or event markers, and in the same map, the directory markers, filtered by category.

Method 1 : Manually filtering categories

This method can be used in any context, not only with directory pages. It can also be used when the map is not published on directory pages at all. A great technique is the usage of markerset selection list or a markerset checkbox selector. The concept is to create a markerset for each category of the directory for the maximum versatility :

  • Create one map
  • Create one markerset for the first category (or parent category)
    • set a name based on the category
    • set a custom icon based on the category (you can also use the automatic icon from category or icon from entry, see below)
    • in the Data source tab of markerset editor, select the needed category
  • Repeat this for each directory category
  • Attach each markerset to the same map
  • Load the map and you will see all markers (of all categories)
  • In addition if you set the [sidelists], [selector], [multi_selector], or [toggle_selector] (check box) controller in the map template you will see those controls as well.
  • The user can select what markerset to display

Note : you can also only create the markersets for the parent categories, in this case, simply select the child category at same time as the parent (multi-select)

categories-and-markerset

Method 2 : Automatic filtering based on current category

This solution is 100% automated, and is very useful if you are using the directory components built in category navigator to navigate in the categories. With one map, 1 markerset, and 2 minutes, you can create a map that displays the markers based on the*current* category and with that category’s icon.

  • Create one map
  • Create one markerset
    • set a name
    • set a custom icon (you can also use the icon from category or icon from entry, see below)
    • in the Data source tab of markerset editor, enable the Auto-cat option
  • Load the map and see all markers (of all categories)
  • Publish the map into the Geocode Factory - Show map module on the directory pages (see above)
  • When the user browses the categories of the directory component, the map (in the module) will show only the markers from the current category (also child categories), and the icon can be automatic.

Note : in this case you cannot use a markerset selector, because all markers are displayed from one unique markerset.

categories-and-markerset-auto

Show a Geocode Factory map in a directory entry

In the directory component you always can see a detailed view. For example, in the category named “hotel”, you will see a list of hotels and if you click on a hotel entry, you will see the hotel detail, like address, photos, and description. Here the Geocode Factory map can also be used to show the current entry position.
When an entry is chosen by the user, the Geocode Factory map will always try to zoom in on the current marker.

  • Create one map
  • Create one markerset
    • set a name
    • set a custom icon (you can also use the icon from category or icon from entry, see below)
  • Load the map and see all markers (of all categories)
  • Publish the map into the free module on the directory pages (see above)
  • Into the module select the zoom level :
    • 0 = use the automatic zoom, based on viewport
    • 1 to max : force the zoom in a specific level
  • When the user browses any entry of the directory component, the map (in the module) will zoom on the marker.

This view is the category view, where you see all entries from the current category, and on the left is the Geocode Factory map (in module position) :

Map-directory-category

This view is the entry view, where you see the position of the current entry. On the left, is the same map, with the same markerset, but automatically centered on the current entry marker, with a different zoom. (customizable in module) Other markers are also present on the map :

Map-directory-entry

 

Show a Geocode Factory map in a Sobipro entry

 

With Geocode Factory is possible to show a map near or within a Sobipro entry. For either solution you need to configure the Geocode Factory - Show map module. If you want to display the map into a module position, you can use the method describe above, and if you need the map within the entry (even entry tabs) follow this process :

  • Create a Geocode Factory map
  • Create a markerset with all entries
  • Show this map within the Geocode Factory - Show map module
  • Publish this module in a hidden position
  • Add this line in your Sobipro template :
    geocode-factory-article-in-sp

NOTE : if you have less and fixed number of Sobipro entries, you can create one markerset by entry...

Marker icons with categories

You can define different type of icons for your markerset.

Normal icon

Use a custom icon, a map icon, or a predefined icon. This is not related to a category, and is not automated for categories.

Entry icon

In the markerset editor, on the marker icon tab, select the “Logo/Avatar” option, then the icon image will be the icon of the entry.

Category icon

You can show each item with the directory component category icon on a geocode factory map.

  • First of all you need to make sure that each category is configured to have a icon.
  • Configure the markerset(s) to show the category icon as the marker on the map. Go to the markerset manager and select a markerset or create a new markerset. Choose yes where you can select Category as icon.
  • Enable Category as icon, overrides the selected marker image.
  • Make sure each category is configured with a icon. If not, the item is not shown on the Geocode factory map, where Category as icon is enabled.
  • An item can be in more than 1 category. On a map where there are more than 1 categories shown, only 1 marker for each item is shown. This will be the marker of the first category.
  • When you load the map all the items are shown with the corresponding category icon. Items in categories, which are not configured to show a icon, are not shown on the map.

This works as well with maps that use a marker set where Auto categories is enabled.

When you load a main category, the icons of the items in the subcategories are shown.

Sobipro sample, here you set the category image :

Geocode-Factory-Categories-Sobipro-cat

Here you see the main map, from the top category :

Geocode-Factory-Categories-Sobipro-cat-top

Here you see the markers when you browse into a child category :

Geocode-Factory-Categories-Sobipro-cat-child

Multiple markersets with different icons

Imagine that we have a map that contains several markers. Each item can have some information like a checkbox "Instruments : drum, guitar, bass, piano".

Now you can create 4 markersets, one for each instrument (Bands with drummers, Bands with guitarists, ...) based on a filter on the Instrument field, with each its own marker icon (drum, guitar...). Now we create a Band entry with the options Drum and Bass.

In the map manager there is a option named 'Duplicate markers' with 3 options :

  • Display one strict (if no frontend markerset selector) : Show each marker only once. Our entry will only appear in the first Drummer's markerset. This option is designed to save resources if you don't allow the frontend user to select markersets.
  • Display one (show in each markerset and one in ALL options) : will show the entry in the Drummers, Bassists and All. In the all option one marker is shown for John, and the first icon, and first bubble templates are used (You can set it as first in the markerset order).
  • Display all (marker shown in each markerset and each in ALL option) : will be shown on the map in the 2 markerset, and 2 times (for the 2 entries) in the All option. In this case the 2 icons are on the same place, and you can use the medium or low accuracy to have a better looking result.

You can see a real working sample in this Geocode Factory case study and in this capture we have select in the listbox (not visible on capture for customer privacy) the -All- option :

Geocode-Factory-Markerset-All

And in this capture the Babysitter option :

Geocode-Factory-Markerset-unique


Using the different radius search methods

Introduction - what is a radius ?

First of all let’s understand how he radius works. Imagine that you have a compass and some pins disposed on a map. Select a fixed point on the map and draw a circle. Some pins will be inside the circle. Others pins will be positioned outside of it. How we intend to choose the pins by circle drawn on the map is the way how the radius works. Using the radius we will filtering the pins automatically.

Geocode-factory-understanding-the-radius1

The radius use two parameters. The "radius" and the "fixed center point" from where the circle is drawing.

Radius and Geocode Factory

In Geocode Factory there is multiple method to use the radius. This radius is defined in the backend by the admin, and cannot be changed by frontend user.

Markerset radius

In the markerset editor you can enter a numeric radius value, the unit (kilometer, miles, nautical mile), and the center point. As center point you can use one of the following methods.

Registered user

This will set the radius center on the current registered connected user. We speak about the coordinates saved in his profile, and not the browser position.

The radius center will be different for each user. Of course user need to have coordinates. Very useful for member only maps.

Note 1 : the cache option can not be used here.

Note 2 : this will only work if the user is logged.

 

Map center point

This will set the radius center at the map center point defined in map editor. The radius will always start here.

radius_help_003

Useful if you create city map, or such. This radius method will only load the markers on a fixed radius set on the backend. There is a sample, the radius center points is located on Cincinnati USA (lat:39 ,lng:-84), and the radius at 500mi, then only the markers in this radius will be loaded and interact with further user action.

radius_help_002

As you can see there is only users in a 500mi radius around the fixed point. Now if the user will interact with the markers (sidelist, filtering, front end radius, ...), it will only take effect on the loaded markers.

radius_help_001

Note : the radius circle isn't drawn here, but is a setting.

Current entry / profile

This option set the radius center on the current detailed view or current profile. This option is usable only if the map is loaded trough the module, because is need to be used in detailed view or profile view of an third party component.

Note 1 : the difference between "Registered user" and "Current entry/profile" options is that the first can be used on any maps.

Note 2 : if the markerset's Auto-cat is set to Yes, this feature will not work.

Map radius

Geocode Factory also offers other frontend radius method. Them can be controlled by the user (connected or not).

Radius form

With this method the user interacts on the frontend map markers. The goal is to give a chance to frontend user to enter a custom address, and a radius, and see the result dynamically on the map.

For example a user can type "los ang" int the address input, and Geocode Factory will autocomplete the address in "Los Angeles, USA" in the search form, and the user select a radius value. The result will be :

radius_help_004

To implement this frontend radius form you need to edit the map template, in map editor, and add the [radius_form] placeholder, see the Geocode Factory map templates article for more details.

Note : if you have already loaded a markerset with a backend fixed radius, this frontend radius search will only search trough loaded markers.

Mouse click

With this method the user interacts on the frontend map markers. When the user clicks on the map the current default radius value is used, and the map is shown dynamically the resulting markers on the map.

For example a user can select a 50mi radius and pick a point on center of the Puerto Rico Island to see how many markers are in this area :

radius_help_005

In this sample we used the "Draw circle" option to see a circle that represents the radius.

You can select what mouse button click send the radius draw :

geocode-factory-radius-click-center

Note : used in conjunction with clustering, it can disappoint users, because some user want click on cluters icon to zoom

User's browser position

You can load your map centered on the user's position (based on browser position). For this simply apply the following option. By default it use the first value of the radius selector values entered in backend in 'Distances list' setting (comas separated values), even if the radius form is not present in frontend. If the radius form is present in frontend, the used radius value is the current selected into the radius dropdown list.

google-maps-load-markers-based-on-browser-position

Note : this option require that the user allows the privacy rule to be geocoded. When page is loaded, a message appears, and ask the user to share hes position.

Url defined

As administrator, you can also use 2 url variables to define a map center, and radius : gf_mod_search for the centerpoint, and gf_mod_radius for the radius value. In this sample, we ask the city of Bern (Switzerland), and a radius of 10km. Then simply add this to the url (of course the page need to have a published map) : ?gf_mod_search=bern,switzerland&gf_mod_radius=10.

Note : you can also use coordinates : ?gf_mod_search=447.355,5.234&gf_mod_radius=10.

 

google-maps-radius-search-from-url

To use this feature, you need to include the radius form placeholder [radius_form] into the map template. See the Geocode Factory map templates article for more details.

This option will allow you to generate advanced configuration, or creation of custom extensions that can call a map. As example see bellow the "Data form module".

Data form module

To use this method, you need to install and configure the "Data form module". This module allows you to use a radius form (address and radius select) in any module position and on any page of your website (even if the Geocode Factory map isn't visible). After user have entered an address (or zip or other), the map will be loaded with the radius search result.

See the module chapter in the getting started guide. To use this feature, you need to include one of the 2 radius form placeholders, see above.

You can see a working sample of this module in the demo section > sites using Geocode Factory.

Third party plugins

There is also 2 others method to use the radius search on a map. They are based on optional commercial plugins :

  • Sobipro map search : allow to display the Sobipro search results on a Geocode Factory map. Please check the related detailed configuration article. In some words, publish a Geocode Factory map on the search form page with one of the radius form placeholder (see above), and publish a Sobipro markerset on this map. The search results will be displayed. Note : it's compatible with our Sobipro Radius Search application.
  • Community Builder map search : allow to display the Community Builder search results on a Geocode Factory map. Please check the related detailed configuration article. In some words, publish a Geocode Factory map on the search form page with one of the radius form placeholder (see above), and publish a CB markerset on this map. The search results will be displayed.

Showing distances from center

When you use the radius, it will be useful to know the distance of each marker from the center. There is 2 solutions to see this distance. The displayed unit (km/mi) depends the unit defined in map manager. If you use the frontend radius option, you need the placeholder [radius_form] see above.

Distance in marker bubbles

When you open the marker bubble the distance from center will be displayed. For this simply add the [distance] placeholder in the bubble template. See the advanced bubble design for more information.

Distance in side bars

When you use the [sidebar] in the map template (see the map template), the list is sorted by names (depending the choose title field), and, when the user launch a radius search the list is reloaded (reloaded because the content of list is changed ... regarding the radius), and it will be sorted by distances.

Radius options

There is some more things to understand. Theses options are for all cases.

Draw the circle

The radius searching can be used with or without a circle. This circle is designed automatically. In the map editor, simply set the related option to Yes.

Center on the resulting radius

To have the map automaticaly centerd on the radius (even if the radius is changed by the user in frontend), simply set the center map option (in map editor) to the "All markers" option.


How to use debug mode ?

"How can I track configuration problems or errors ."

Follow this procedure to activate the debug mode :

  • Go in component control panel
  • Select the Component parameters icon
  • Set the Debug mode to ON
  • Save

You now will see all PHP warnings and notices. If you see some notices, warnings or errors, please report them by creating a support ticket.

In the frontend, you will see the message  Debug ON above any map.

If you load any markersets, you will see a link pointing to an xml file. That is the raw data about the markers loaded on the maps. In case of markers not loading, or wrong markers, it's a good idea to check this file if some errors are reported, or if markers are present.

When in debug mode, when you click on a marker to load the bubble, you will see a new link appearing near the marker xml link. This new link is called Bubble link. Here you can see the content of the bubble loaded in a fresh browser page. This can be useful for debugging styles and such.

Note 1 : The debug mode should not be used with a published production site.

gf_23_lines_03


Map Marker Clustering in Geocode Factory

Introduction

Clustering clarifies your data visualization by grouping markers that are near each other on the map. This grouping is dependent the zoom level. Based on the sample map you see below, the clustering function will draw a grid, and group the markers from each area, in one special marker that contains a number on it representing the number of individual markers it consolidated. The goal is to clarify the final view of the map by reducing the amount of clutter.

google-map-grid-clustering

google-map-grid-clustering-done

In each cluster, you see the number of included markers, and when you click on a markers, the map will zoom into this area, and then you will see more clusters or markers if you are on the level which the clustering stops.

Settings

Open the GF map manager and edit the map where you want to apply the clustering. Then select the "clustering" tab.

clustering-settings

Here you can enable the clustering by setting the 'Use clustering' to Yes. This setting is enough for a basic usage, it will use default values.

Advanced settings

Ending Zoom

The ending zoom is the zoom level at which clustering will be stopped and all individual markers will be shown. In this example we click on the bottom left "300" markers icon. The maps then zooms and there are new clusters formed. The map is now centered on this point. Now if we click on the "100" cluster, clustering is stopped and all markers are visible, even if we can zoom more. This sample is from the site www.yway.ch

cluster-zoomend-full

cluster-zoomend-middle

cluster-zoomend.end

Grid size

This value define the grid size of a cluster in pixels. Each cluster will be a square. If you want the algorithm to run faster, you can set this value larger. The default value is 60. In the following capture you will see the same map, at the same zoom. The first one has the grid set to 30 and in the second the grid is set to 120.

cluster-grid-30

cluster-grid-120

Custom images

By default, if these values are null, the clustering system uses the default, internal images as per Google Maps. You can change the default images. To do this you can define the location for GF to get the cluster images. In the parameter 'Cluster image path' enter the full URL of the root name of the folder that contains the image files to use for cluster icons. As per the Google API these images must be named numerically: "1.png, 2.png, etc..." Therefore the complete file name would be: "imagePathn.png" where n is the image file number (1, 2, etc.). Sample : /images/clusters/1.png, /images/clusters/2.png, /images/clusters/3.png, ... Cluster images size is an array of numbers containing the widths of the group of imagePathn.png image files. (The images are assumed to be square).

In this sample you can see a custom drawn image used for cluster.

clustering-sample-icons

Minimum cluster size

The minimum number of markers needed to form a cluster. The default value is 2, but you can set it to be a larger number if desired.


Marker Icons

Introduction

In Geocode Factory you can use different images as marker icons. There is not only a selectable list of images, but you will find some advanced options. All the options from this article are in the Markerset manager editor, within the Marker icon tab.

marker-icon-tab

Common parameters

Image size

If you use any custom image (except the google balloon), you can define the icon size on the map. For this there are 2 parameters: width and height. The values are in pixels and this setting defines the size for all image of the markerset. Ideally it's best to have uniform image sizes to begin with like avatars or entry images. that makes it easy to scale them proportionately.

gf_25_rescale_step1gf_25_rescale_step3

Folders

When you upload images to use as icons, you need to upload them into the correct folders. This is the list of folders :

  • Joomla images : use the normal Joomla! image folder images/ (images/stories/ for joomla! 1.5)
  • Mapicons : if you want add your own icons here, the folder is : components/com_geocode_factory/assets/images/markers/
  • Profile icon : in the profile map, we use a blue icon. You can replace this icon here: components/com_geocode_factory/assets/images/markers/

Normal icon

Normal icons are images that you have uplaoded on your site, or the simple google balloon.

Google balloon

This is the basic option, and will display the google balloon. This icon is controlled by google, and if google change the default type, it will be changed too.

In Marker icon type, select : Default google.

marker-icon-tab-google-balloon

Custom image

You can select any image from your computer, and upload it into you joomla images folder.

In Marker icon type, select : Joomla image. The uploaded images are now available into the Joomla images listbox, and you can select them.

Mapicon

Map Icons Collection is a set of more than 700 free icons to use in Geocode Factory. Geocode Factory includes a sample of the collection of about 100 icons, and more icons are loadable for free. The icons are from Map Icons Collection, you can also customize the colors on this website and generate more icons.

In Marker icon type, select : Map icons. Now you can select the desired icon in the Map icon listbox.

marker-icon-tab-mapicon

Automated icons

Automated icons are taken from the markers source itself, like the profile avatar or such. See the Geocode Factory and categories article for more details.

Profile or entry image

If you are using a profile markerset (for Community Builder or Jomsocial), you can use the user's avatar as marker icon. In the same way you can use the entry / ad / listing image.

In Marker icon type, select : Logo/Avatar. Now the avatar or logo will be used. If there is no image, then the google balloon is used. In Sobipro, you can use any custom field (of type image), as entry logo (icon), then you need to select what image to use.

The image bottom-center is the point that is related to the marker coordinates. Geocode Factory draw a little circle to identify this point. You can change this image. It's located in the same folder with the Profile icon (see above). You can change it in a frame to surround the image, in this case it's advisable to fix the image size.

gf_faq_avatar01

Category image

If you are using a directory component that allow to use images to identity categories, you can use this image as marker icon. Then with one marker set you can have different marker icons on your map defined by the category that the marker comes from. If an entry is in multiple categories, the first image is used.

In Marker icon type, select : Category image.

Using different icons on same map

Of course you can mix multiple markerset with multiple image method on the same map. For example, you can create a map with :

  • A markerset based on user's profile with avatar as marker icon
  • A markerset based on Sobipro entries, with the categories images as marker icon
  • A markerset based on JEvents with a Map icon as marker icon

Sample

We want to create a map based on members profiles and we want to differentiate between mebers who are online and offline. At first we need to upload 2 icons (one red and one green) with the Joomla! media manager into the images folder (see above). Follow this step by step procedure :

  • Create your map "My users map", with all options you need
  • Create a markerset name "Only online users", and set the following options:
    • Link the markerset with the "My users map" map
    • Select the green icon
    • Create the bubble template
    • On the "Data source" tab, select the "Online profiles" option
    • Save
  • Create a markerset name "Only offline users", and set the following options:
    • Link the markerset with the "My users map" map
    • Select the red icon
    • Create the bubble template
    • On the "Data source" tab, select the "Offline profiles" option
    • Save
  • Create a menu item for this map, and check in the frontend

gf_23_online_offline_02


Google route planner in marker bubbles

Introduction

In Geocode Factory you can display a route/directions panel near the map. You can select where to place this panel, and what your travel mode is (car or walking). You can create directions using two different methods :

  • Directions between 2 existing markers
  • Directions from a custom address (or user's position) to an entry

Configuration

Enable the route planner

There are 2 items to configure before using this feature. Both are in the map editor. Go to the maps manager, edit the map that you want to display routes on, and follow the next steps :

  • Under the "Display options" tab, locate the "Show route planner" option, and set it to Yes.
  • Under the "Layout" tab, set the [route] placeholder variable (see the Advanced map template article), where you need to display the directions panel.

google-maps-route-planer-configuration

Enable the route planner in marker bubble

To see the "Get directions" form you need to add the [waysearch] placeholder variable (see the Advanced bubble template article) where you want to see that option in the form.

You can also display a "locate me" icon which will determine the user browser coordinates and enter that in the "From" input with the geocoded address. To display this option you need to edit the component parameters and enable the "Locate me in waysearch" option.

google-maps-route-direction-frontend-bubble locateme

Enable the planner between markers

When you have connected 2 users profiles (friends), or linked entries with their owner, you should see connection lines between them. The connection lines are direct straight lines. Theses lines are clickable.

Usage

As we established, there are 2 ways to utilize the directions panel.

Directions from user to entry

Click the marker where you want to drive and in the bubble, the directions form should appear. If you then enter an address, the route will be calculated between this address and the marker's position.

google-maps-route-direction-frontend-bubble

Directions between markers

When the route planner is enabled, if you hover over the connection lines with the mouse, you will see an effect. If you then click on this line, the real route will be displayed, and the route panel will be completed with the directions.

google-map-route-display


 

Geocode Factory map types

Introduction

In Geocode Factory you can use any map type, als custom map types. The engine (controls, markers display method) is always Google Maps, but you can have any kind of map content.

As exemple it's very easy to display any map type based on the openstreetmap project (www.openstreetmap.org). Or you can create your how custom tiles based on a aerial image, or custom drawning. For this you need to create compatible tiles. Any map is composed of a list of tiles, and tiles are based on zoom, see the 3 following images, for 3 different zoom. These tiles are based on a airplane large picture to cover a caraibeen island and below the resulting map :

tile 8941tile35767alt

 

custom google map type based on photo

Working with custom tiles

Learn how to display openstreetmap in Joomla. In addition you can set a custom map type as default at map loading. You can add an unlimited number of differents maps types. Open the map editor, open the "Display options" tab, and locate the "Load different tiles" textbox.

geocode-factory-tiles

For this you need to enter a parameter line for eache type in Geocode Factory map editor. This parametere line includes all needed information to display the map type, like the tiles size, zoom, etc, and the map type name...

Openstreetmap and other custom tiles

To do this you need to generate a simple phrase that include all parameters of this new tiles source. There is a sample of the phrase :

 

http://tile.openstreetmap.org/#Z#/#X#/#Y#.png|Mapnik|18|Open Streetmap Mapnik|true|256;

 

And you can add multiple parameters line for the same map, simply by separathe them with a semicolon ; .
gf26_tiles

Any parameter is separate with a line |. And here the description of each parameter with a openstreetmap sample :

  • http://tile.openstreetmap.org/#Z#/#X#/#Y#.png : the url where are the tiles, the #Z# (zoom), #X# (latitude), #Y# (longitude), will be automatically replaced by the current map position.
  • Mapnik : the text of the map type button
  • 18 : the max zoom allowed for this map
  • Open Streetmap Mapnik : the tool-tip for the map type button
  • true : tiles images are png files
  • 256 : tiles size
  • | : separator for the phrase
  • ; : separator if you use multiple maps.

After you have created your phrase you can copy it into the textarea. You can set multiple phrase, separated by “;”, then you will have multiple map types.

Note 1 : if you dont know the size, or the file format of tiles, you can leave the last item empty. Geocode Factory complete the phrase with default values.

Default map type

In the map manager, under the "Google controls" tab, the Default map type contains all available map types, including the custom map types. Simply select the default type loaded at map opening. Aditionnaly you can select what type of map is loaded with the map. We can imagine that you don't load any google based types, and only the custom ones.

Note : you need to save the current map before the custom map type are in the list.

gf_maptype

Bing tiles

You can also include tiles from the Bing! maps, they are loaded into the google map. You can already switch between theses tiles from Bing and even other Google tiles. We have added the support of Bing map because in some places the imagery or maps render better.

 


The cache in the Google maps for Geocode Factory

How it work

  • Ensure you that you have at least the version 2.1.2 of Geocode Factory
  • Edit the map where you want to enable the cache
  • Go on the "Display options" tab
  • Check the "Cache duration:" option to the desired cache duration
  • Done!

The cache creates a temporary file that contains all of the makers and connections paths. It reduce the loading time and reduces the time between the frontend markerset changing. If you dont use the cache, the markers list is generated each time the map is loaded, that that can use some server resources. If the cache is activated, and a user do a radius search, Geocode Factory do a dynamic search without using the cache, but if you reset or reload the map the cache file is re-used. The cache file and generation of marker lists is all done on the user's computer (client side). Cache process:

  • you set the cache to 15 minutes
  • you open the map page at 12h00
  • the cache file is created
  • you reload the map at 12h05
  • the map opens quickly (without writing any files or loading profiles from database)
  • if a user subscribes on your site at 12h10 and loads to a map at 12h11
  • the user won't appears on the map because the cache file is generated before at 12h00
  • if the user reloads the map at 12h16
  • the cache file is recreated from the db and the new user is included in
  • the map open with the same markers for the next 15 minutes

In all cases the contents of the bubble is loaded dynamically using AJAX so the contents of the bubbles is not affected by the cache settings.

Note 1 : If you use a very static map (for example a list of your office that never change) you can set a very long time cache. But if you use a communty site then a short time can be used. Of course if you think that the no cache option loading time is acceptable, then you don't have to use it at all.

Note 2 : The cache file is located in the joomla_root/cache/ folder (this folder must be writable by joomla). The file is named _geocode_factory_ID_ITEMID.xml, where ID is the id of the map and ITEMID is the itemid of the menu. If you delete the file, it will be regenerated.

Note 3 : Of course, in a perfect world the cache file is regenerated only when a new user creates a profile or if a profile is modified, but we cannot in a practical way modify the core files of the other components.

What about the Joomla! cache

Geocode Factory is not affected by Joomla! internal cache system because, to be cached, the component need to use Joomla cache methods. We dont use them.

If you use different cache components or if your template use cache functionnalities, it will be a good solution to disable them when displaying Geocode Factory. Why? Because the markers generation, is different each time, depends the user's position, and some time the marker loading is randomised.

For all theses reasons, we use our own cache system, that load the same markers for the same map during 5min, 1 hours, 1 day... time to choice. This is above.


Draw connection lines between markers

It's easy to draw lines between friends (connected profiles), profiles and their entries, events and guests... Here's how you can do it.

First, you can select the color of each type of line (lines between users, between users and entries, ...).Go on the Geocode Factory control panel and select the 'Component parameters' icon, and then enter the color you want in 'human' mode (red, green, etc) or in hexadecimal mode (#ffffff, #f3f4f3, etc).

gf_23_lines_03

Note : You need to save the 'Components parameters' at least one time to apply the colors.

In order to show the lines between profiles, edit the map and select the "Display options" tab, and select "Yes" for "draw lines". For the other lines (between users and their events, entries, ...), you need to edit the markerset and set the "draw lines" option to "Yes".

gf_23_lines_01

Note 1 : The user connections are drawn "by map" and not "by markerset", because some friends can be in different markersets for the same map.

In the following sample, we see 3 friends (red lines), 1 event (gift icon) and 2 of the friends are already confirmed guest for the event (cyan lines).

gf_23_lines_02


 

Understand the Geocode Factoy style sheet CSS

Geocode Factory can generate multiple elements on the web site front end. To be adaptable to many applications, all styles are customizable via both "template" and by editing the included CSS file.

To customize the CSS for a Geocode Factory element you name it with an ID in the style code. Here is an example of a map container that could be entered into the "Component Template" of the map manager :

id="gf_map_1" style="width:100%; height:500px;">

The map ID in green is a sample div ID and it determines which styling is applied to the map. If you wanted to add a border to the map, simply edit the CSS file, and add the following lines:

#gf_map_1{
border: 2px solid grey ;
}

The result is below. The map now has a 2 pixel wide grey border. (the corner of the map is visible behind the CSS editor shown in the picture) :

css02

We can add styles to other elements this way as well. You can edit the side lists [sidelists], remove the borders, make the length unlimited etc. In this next example you can see the ID's that correspond to the name of each sidelist in the demo. It is all done through CSS styling. Here are some example CSS styles as displayed on the demo page :

#sidelists{
float:left;
font-size:.8em;
}

#gf_list_MS_SP_id_1, #gf_list_MS_SP_id_2{
overflow:hidden!important;
border:0px!important ;
margin:5px;
max-height:none!important;
}

#gf_list_MS_SP_id_1 div, #gf_list_MS_SP_id_2 div {
margin: 0;
padding: 0 0 0 5px;
}

css03

Styles can be almost endless!

A simple method to find the style of an element on a web page is by viewing the source code of the element or page. Firebug is a popular extension for the browser Firefox, but there are similar extensions for most popular browsers.

Have fun!

Applies To

Geocode Factory 3, Geocode Factory 5