Plugin - OpenStreetMap

This RSForm!Pro OpenStreetMap Plugin is commercial and needs to be purchased separately. You can buy it by accessing Customer Area > My memberships > Active Memberships > clicking the 'Buy Extra Plugins' button of your RSForm!Pro license. Also note that your account needs to hold an active RSForm!Pro subscription.

The RSForm!Pro OpenStreetMap Plugin is a plugin that once installed and enabled will allow you to add an OpenStreetMap field to your form.

 
Downloading and Installing the plugin
Download

You can download the plugin by logging with your purchase user, then heading to Downloads > Paid Downloads > RSForm!Pro > Modules & Plugins > "OpenStreetMap Plugin".

Install

In the backend of your Joomla! installation go to the Extensions > Install/Uninstall page, and install the plugin. Next thing is to publish the plugin, to do this go to Extensions > Plug-in Manager, search for the "RSForm! Pro - OpenStreetMap" plugin and publish it.

 
Configuring the RSForm!Pro OpenStreetMap plugin

After installing the plugin, you will find a new tab named OpenStreetMap under Components > RSForm!Pro > Configuration area, where you'll need to add credentials based on what service you'll be using:

  • MapBox Access Token: MapBox requires an Access Token provided after registration. See account.mapbox.com for more details.
  • Thunderforest API Key: Thunderforest requires an API Key which is provided after registration. See manage.thunderforest.com for more details.
  • Esri (ArcGIS) API Key: Esri (ArcGIS) requires an API Key which is provided after registration. See developers.arcgis.com/sign-up for more details.
 
The RSForm!Pro OpenStreetMap field

The following configuration tabs are available:

General

  • Name: the name of the form component. This needs to be unique for each form. It can contain only alphanumeric chars. The name of the field is only used for internal reference - it will not be displayed in the front-end area.
  • Caption: the caption or label is the text or HTML that is being displayed in the actual form.
  • Default value: anything you specify here will be automatically filled in when displaying the form within the input area of the map. Inside the Default Value area you can also use custom PHP codes in between the //<code> and //</code> tags.
  • Description: text/HTML area that provides a description of the field. This can be useful for providing explanations or indications for that particular field.
  • Published: Set the field status by choosing Yes or No.

Validations

  • As a validation rule, this can only be set to be Required or not.

 

Attributes

The Attributes area allows you to add JavaScripts triggers, custom style (for that particular field), specify map size, etc. Anything filled in this area, will be added directly to the HTML tag.

  • Map Width: the width of the map, it should be specified in pixels(example: 450px).
  • Map Height: the heigth of the map, it should be specified in pixels(example: 300px).
  • Request Current Location: Yes / No. Enable this option if you would like to ask the user to supply his current location on the map.
  • Map Center: the center of the map, specify this in coordinates
  • Map Zoom: the starting map zoom, it defaults to 10.
  • Enable Geolocation search: enable or not Geolocation.
  • Result output: choose between showing the address or the actual coordinates when moving the map pointer.
  • Map Type:
    • OpenStreetMap

    • MapBox
      • Tile Type (MapBox):
        • Streets
        • Dark
        • Light
        • Outdoors
        • Sattelite
        • Sattelite Streets
        • Navigation Day
        • Navigation Night

    • Thunderforest
      • Tile Type (Thunderforest):
        • Neighbourhood
        • OpenCycleMap
        • Transport
        • Landscape
        • Outdoors
        • Transport Dark
        • Spinal Map
        • Pioneer
        • Mobile Atlas
        • Atlas

    • Esri (ArcGIS)
      • Basemap style service (Esri):
        • ArcGIS:Streets
        • ArcGIS:Navigation
        • ArcGIS:NavigationNight
        • ArcGIS:StreetsRelief
        • ArcGIS:StreetsRelief:Base
        • ArcGIS:StreetsNight
        • ArcGIS:LightGray:Base
        • ArcGIS:LightGray:Labels
        • ArcGIS:Imagery
        • ArcGIS:Imagery:Standard
        • ArcGIS:Topographic
        • ArcGIS:Topographic:Base
      • Custom Basemap style service: You can find a list of basemap styles here, from where you can copy the parameter name, for example: ArcGIS:Oceans:Labels.

    • Stamen
      • Tile Type (Stamen):
        • Terrain
        • Toner
        • Watercolor

    • Custom: a list of raster tile providers can be found here. From this URL, you can copy from the 'tiles url' column, for example:
      • Tiles URL: https://tile.thunderforest.com/cycle/${z}/${x}/${y}.png?apikey={accessToken} - make sure to remove the $ sign
      • Access Token (API Key): some of the above tiles requires an Access Token which you can add here
      • Attribution Anchor (for URL): some of the above tiles requires an Attribution Anchor which you can add here
      • Attribution URL: some of the above tiles requires an Attribution URL which you can add here
  •  
  • Size: the size of the input field.
  • Additional Attributes:
    JavaScript: onchange="your_function();" - this will trigger a JavaScript function when the map input changes values.
    CSS: style="margin-left:20px" - this will set a 20px margin on the left side for the input field.
    Input property: readonly="readonly" - the map input field will not be editable for example.
     
 

Available placeholders

For OpenStreetMap field are available the following placeholders:

  • {field_name:caption} - this placeholder is used in order to retrieve the field's label
  • {field_name:value} - this placeholder is used in order to retrieve the OpenStreetMap value

Note: You can use the above-mentioned placeholders in the Submissions front-end listings, Thank You message, Email messages and also in the PDF Attachment (the value field_name should be replaced with the actual name of the field).

04 Mar 2024
Version 1.0.1
  • Added - Joomla! 5 native compatibility - no longer needs the 'Behaviour - Backward Compatibility' plugin.
01 Mar 2023
Initial Release

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Plugin - PDF (Attach an automatically generated PDF to an email) HOT

Plugin - SMS Notification (Send a SMS to a mobile phone number) HOT

Plugin - RSEvents!Pro (Create custom event registration forms) HOT

Ticket PDF plugin HOT

Plugin - External Mailer (Use different email settings and add DKIM support) HOT