Friday, 13 September 2019 09:47
Modified: Friday, 27 September 2019 15:57

OSM in DJ-Classifieds

Full support for OpenStreetMaps in DJ-Classifieds component

The OpenStreetMap is a new equivalent for Google Maps. As you may know, Google recently updated its policy for using Google Maps.

This changes add limits for free usage and require users to attach their credit cards to the account, which is not accepted or cannot be processed by some organizations. Google Maps can also be limited in certain countries - so this is where OpenStreetMap steps in.

Thanks to the OpenStreetMap support you don’t have to worry about Google restrictions and do not have to provide the Credit Card information.



DJ-Classifieds uses the Google Maps API by default. To enable OpenStreetMaps maps, you need to publish the “DJ-Classifieds - Leaflet Maps” because it is disabled by default. 

leaflet plugin Joomla

After enabling the plugin, the map provider will change automatically in the global DJ-Classifieds options (as well as in map modules):

Map provider settings

The enabled plugin allows you automatically to start using OpenStreetMaps instead of other interactive maps.

If you want to switch from Google Maps to OpenStreetMap here's what you need to do is Enable "DJ-Classifieds - Leaflet Maps" plugin.

Other information that may be useful when configuring individual options related to maps and locations:


Where you can display maps

Maps can be used in various views. OpenStreetMap is supported in these views and modules:

OpenStreetMap in DJ-Classifieds New Advert form

New advert with a map view

Map settings available during the new advert submission can be configured in the DJ-Classifieds options.

These options are available for OpenStreetMaps:

  • Places hints in address - decide if you want to display hints in address field during the advert submission process
  • Allow to provide coordinates – Decide if you want to allow advertisers to add GPS coordinates during the advert submission process.
  • Default address for coord. map – Default address for a map where user can select coordinates
  • Scroll wheel zooming - Scrollwheel zooming on the map during advert creation and in advert details.
  • Maps icon – if you want to use the custom icon on maps, set it to 'custom' and put your custom icon to /images/ folder with name: djcf_gmicon.png

There is a possibility to decide whether the longitude and latitude fields in advert submission form should be used. Learn more: Hide longitude and latitude in the submission form

OpenStreetMaps in DJ-Classifieds Advert's detail page

Advert view leaflet maps

There is the information below the map, including Geographic coordinates and a reference that "Map location might not be exact."

Map settings available in the advert view can be configured in the DJ-Classifieds options.

Available options for OpenStreetMaps are:

  • Default address for coord. map – Default address for a map where user can select coordinates
  • Show coordinates – Show/hide geographic coordinates under the map in advert details.
  • Show map – Show/hide Google Map in advert details.
  • Map img on start - show in advert details image with the button that will show map
  • Map Zoom – Default map zoom in advert details.
  • Scroll wheel zooming - Scrollwheel zooming on the map during advert creation and in advert details.
  • Maps icon – if you want to use the custom icon on maps, set it to 'custom' and put your custom icon to /images/ folder with name: djcf_gmicon.png

OpenStreetMaps in DJ-Classifieds User profile view:

User profile view

Options for displaying a map on the user profile view are available in the DJ-Classifieds options, in the "Views" tab.

Profile map settings

Learn more in the DJ-Classifieds options.

Another example. This time for the DJ-Classifieds map module:

map leaflet module

All settings for this view are available to configure in the Maps module

We have a demo site for DJ-Classifieds, where you can check different views: OpenStreetMap version

POI (Points of Interest) in OpenStreetMap.

One of the new features you can use with the OSM is hints (suggestions) that appear in the search module when using the Address field as well as in the submission form. Similar to what you may know from Google Maps features when the user starts typing in one of those fields - the suggestions pulled via OSM API are displayed and can be clicked to use as a search.


Geolocation services

OSM provides the geolocation services as well so when using the "Use my location" button in submission form of the advert or the location icon in the search module - the map (in the submission form) and location address in the address field in the search module are updated and can be used to search by range.


Maps module parameter - "Fit to items"

When using this option the map module will display the view that will cover all the items from DJ-Classifieds. For example - if your site has adverts from all over the world - the map will be zoomed out to the whole world, but if your website is limited to some smaller location range it will fit the zoom of the map to display all of the items from this area.

There's also another parameter in the maps module that works with the OSM - "Start address from geolocation" - when this is set the page where the map module is displayed will use geolocation to center the map where the user is. This is a good solution if you want to show the items close to the user.

Learn more about Maps Module

Driving directions

The map included in the single advert view contains Driving directions field where you can type your address. This will redirect you to the OpenStreetMaps website where you will receive information about how to get to the advert location.

You can make it quicker and click the "Use my location" button. Your location will be determined based on geolocation services.


Use my location

Map driving directions option can be enabled or disabled in the DJ-Classifieds component options. Open the Global" tab and scroll down to "Map & Location settings".

 Map driving directions

Related articles: 

How to set the leaflet OpenStreetMap in the component and maps module

Leafler OpenStreeMap integration

DJ-Classifieds Maps module

Display Geolocation address in the search module

Use location region in Url's

Hide longitude and latitude in the submission form

Display all location regions in one view

Location region module 



Ultimate classified ads solution for Joomla.

Learn more