JBStrap Geographical Map

The JBStrap map plugin displays a map that has multiple features:

  • A base map layer that uses an open-source map provider.
  • Add shapes (rectangle, circle, area, line) to the map.
  • Add POIs to the map.
  • Search for POIs by their coordinates (geocoding).
  • Find your local coordinates (geolocation).

A JBMap is an interactive geographical map component that uses the Leaflet JavaScript library . Users can designate POIs on the map with pictures, popups and HTML content. Also, users can insert shapes, such as circles, rectangles, lines or a polygon.

The map uses the geographical latitude and longitude coordinate system. Map tiles are positioned within this tile layer. You can use several providers to retrieve the tile layer (map layer) from. To include the map layer service, you need to extend the BaseMapLayer class.

By default, JBStrap uses the OpenStreetMap provider, but you can use other providers as well:

Creating a map

To create a new map, instantiate the JBMap class:

Set the center coordinates of the map and then set a zoom value: