DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: rb_osmsimple

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Rolf Bartusel
Changed:2012-09-19T15:54:35.010000000
Author:Rolf Bartusel
Email:info@rolf-bartusel.de
Info 3:
Info 4:

EXT: rb_osmsimple

Extension Key: rb_osmsimple

Copyright 2000-2009, Rolf Bartusel, <info@rolf-bartusel.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: My Extension 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 1

FAQ 1

Adminstration 1

FAQ 2

Configuration 2

FAQ 2

Reference 2

Tutorial 2

Known problems 2

To-Do list 2

Changelog 2

Introduction

What does it do?

With this extension you are able to include a dynamic and scalable map view or a static map image generated by the OpenStreetMap Project (www.openstreetmap.org) into your homepage and show the position of your home, working place or whatever. There is an additional form for address search.

Users manual

After installing this extension in the repository you can directly use it without configuration. If needed, the admin user can change in repository the folder where to store map images downloaded from OSM (Default:/fileadmin/) and the URL to get data from OSM. This second option should be changed only by experienced users!

Standard users must do two steps:

Create a new map entry in a “SysFolder”. Here you make all needed configuration and select optional extras (marker image, gpx-layer etc.).

Put a content plugin “Show OSM-Map” into an output page. This plugin has to be connected to an existing map entry. For every content element you can select the output type (dynamic or static view).

If you want to use search form, put the search form plugin in an output page. This plugin uses still experimental search engines, not every search will be successful. It is the first step into an address search functionality.

Configuration

After installation admin user can change in Extension Manager module some Typoscript settings if needed:

MapFolder

Property

MapFolder

Data type

string

Description

A directory in the fileadmin directory, where the OSM maps are stored.

Default

fileadmin/

OsmUrl

Property

OsmUrl

Data type

string

Description

URL (with placeholders) which is used to get map image from OSM.

Default

See left.

DebugMode

Property

DebugMode

Data type

Boolean

Description

Show debug informations in frontend if any problems.

Default

0

AdviceFromBottom

Property

AdviceFromBottom

Data type

Int

Description

Pixel-distance of OSM legal advice from map bottom In “em”, allowed are 1 to 10;

Default

4

urlnominatim

Property

urlnominatim

Data type

string

Description

URL (with placeholders) which is used in search form.

Default

Tutorial

Map output

  • Create a new “OpenStreetMap” record in a SysFolder page.
  • Create in standard page a content plugin “Simple OSM: Show Map” for frontend output.
  • Select in Basic Settings of plugin as required map and view to include into this page.

Search form output

  • Create in standard page a content plugin “Simple OSM: Search form” for frontend output.
  • Set in Basic Settings of plugin the page with map output for showing search result and select which search databases to use. The targeted map page should not be cached.

Map data record

The map data record form contains the following fields: Since version 0.7 input form is divided into two tabs.

Map label

Field

Map label

Content

Only for purpose in TYPO3 Backend.

Latitude

Field

Latitude

Content

Latitude in format DD.dddd.

Longitude

Field

Longitude

Content

Longitude in format DDD.dddd.

Zoom factor

Field

Zoom factor

Content

OSM based zoom factor.

Map width

Field

Map width

Content

Width in pixels of map file.

Map height

Field

Map height

Content

Height in pixels of map file.

Map format

Field

Map format

Content

Select image format (jpg, gif or png). Only for static view.

Map file

Field

Map file

Content

Used map file, auto generated by extension. Only for static view.

Marker image

Field

Marker image

Content

The extension has an default marker image, which shows your position in map. You can select your own.

Horizontal correction

Field

Horizontal correction

Content

Horizontal correction in pixels of marker image from main image center: negative value means up, positive down. Only for static view.

Vertical correction

Field

Vertical correction

Content

Vertical correction in pixels of marker image from main image center: negative value means left, positive right. Only for static view.

Make new map?

Field

Make new map?

Content

Activate this checkbox if you want a new map file from OSM-Server. Only for static view.

Do not use marker image

Field

Do not use marker image

Content

Do not use marker image.

GPX File

Field

GPX File

Content

Add one or more files in gpx format which will be shown as an overlay on your map. Only for dynamic view.

Style GPX Track

Field

Style GPX Track

Content

Set CSS style of gpx tracks. This is a comma separated list of 3 values: color (text or hex-value in valid css), line width (integer larger than 0), opacity (decimal number larger than 0 and less or equal 1, use dot instead of comma). If you show more than one track, you can make for every gpx file an individual css- setting.Examples:red, 5, 0.5 (Default setting if empty!)#ff0000, 3, 0.8Only for dynamic view.

Additional Markers

Field

Additional Markers

Content

Additional markers. This is a list of 4 values per line, which are separated by pipes “|” seperated list:* latitude (DD.dddd) Use dot instead of comma!* longitude (DDD.dddd). Use dot instead of comma!* Image no. (Integer). No. of image in field “Additional marker Images”. If 0 use default image.* Title. Text connected to marker, shown as “onmouseover”-event.Example:51.9560 | 7.6420 | 1 | This is our camping site.51.9430 | 7.6490 | 0 | Best place to put your boats into water.Only for dynamic view.

Additional marker file

Field

Additional marker file

Content

As above list of additional markers in csv-file, can be separated by pipes “|” or semicolon “;”. Only for dynamic view.

Additional marker Images

Field

Additional marker Images

Content

Add one or more images which will be used for additional markers. Only for dynamic view.

Allow search form data

Field

Allow search form data

Content

Accept external data to show in map. (For the moment it only works with extension search form.)

Template Constants Editor

Some basic configuration settings can be changed in the Typoscript Template Constants Editor.

Debug Info

In case of any problems with (especially static) view, you can use the debug output to get more informations. A typical problem is PHP security configuration (“Safe mode” etc), which can prevent the extension from reading/writing map files (“fopen”). You must change this in php.ini.

Known problems

In most cases problems with showing maps occur from TYPO3 cache. So first step should be to fully clear cache.

If dynamic view ist not shown, check whether there is an onload-event for “T3_onloadWrapper” in body-tag. If not, you have to start Javascript init-function in header by TypoScript Setup ( page.bodyTagAdd = onLoad="init();" ).

GPX files can be generated by different applications. If your gpx file does not work with this extension (or better with the included Open Layer scripts) it can depend of the XML structure of the gpx code. You can find in the directory res of this extension an example gpx file ( demo.gpx ). This file works and you can compare your own code structure with it.

To-Do list

Waiting for feedback.

Changelog

0.1.0

Version

0.1.0

Changes

First release.

0.2.0

Version

0.2.0

Changes

Not used because of misunderstanding of TER update.

0.3.0

Version

0.3.0

Changes

Target image can now be switched off.

Minor textual changes.

0.4.0

Version

0.4.0

Changes

Including output of debug informations.

0.5.0

Version

0.5.0

Changes

Additional dynamic output: movable and scalable map view with OpenLayers

0.5.1

Version

0.5.1

Changes

Minor code changes - image path did not work when Typo3 not in docroot. Translate debug info into german.

0.6.0

Version

0.6.0

Changes

Include tracks in GPX-format as overlay on map.

0.6.1

Version

0.6.1

Changes

Debugging input fields longitude, latitude: Allowed length was to short.

0.7.0

Version

0.7.0

Changes

Create additional markers with optional individual images and onmouseover-titles in map.

0.7.1

Version

0.7.1

Changes

New search form plugin, several changes in extension configuration.

0.8.0

Version

0.8.0

Changes

Include csv file for additional markers, use active url for static map image, remove no longer supported gazetteer in search.

img-1 EXT: rb_osmsimple - 3