Knowledge Base - Advanced templating
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 :
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.
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 ; . 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.
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.
Geocode Factory 5