=== CBX Map for Google Map & OpenStreetMap ===
Contributors: codeboxr, manchumahara
Donate link: https://codeboxr.com
Tags: google map, openstreetmap, map, gutenberg, elementor
Requires at least: 5.3
Tested up to: 7.1
Stable tag: 2.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display responsive Google Maps or OpenStreetMap maps in WordPress with shortcodes, custom maps, Gutenberg, Elementor, or widgets.

== Description ==

**CBX Map for Google Map & OpenStreetMap** makes it easy to add responsive maps to your WordPress website.

Choose between **Google Maps** and **OpenStreetMap**, create reusable map locations from the WordPress admin, or display a map directly with a simple shortcode.

The plugin is designed to keep map creation simple. You can search for a location, set the marker position, configure the map, and copy the shortcode with just a few clicks.

OpenStreetMap is supported as an alternative to Google Maps and can be used without a Google Maps API key.

### CBX Map for Google Map & OpenStreetMap by [Codeboxr](https://codeboxr.com/product/cbx-google-map-for-wordpress/)

> 📺 [Live Demo](https://codeboxr.net/wordpress/cbxgooglemap/codeboxr/) | 🌟 [Upgrade to PRO](https://codeboxr.com/product/cbx-google-map-for-wordpress/#downloadarea) | 📋 [Documentation](https://codeboxr.com/doc/cbxmap-doc/) | 👨‍💻 [Free Support](https://wordpress.org/support/plugin/cbxgooglemap/) | 🤴 [Pro Support](https://codeboxr.com/contact-us) | 📱 [Contact](https://codeboxr.com/contact-us/)

== Features ==

* Google Maps support
* OpenStreetMap support with no Google Maps API key required
* Create and manage reusable maps from the WordPress admin
* Custom post type for saved maps
* Simple `[cbxgooglemap]` shortcode
* Display maps without creating a custom map post
* Responsive map layout
* Automatic map resizing with the browser window
* Configurable map zoom and map type
* Marker and information window support
* Custom information window title and content
* Optional website link in the information window
* Custom map marker icon
* Global default settings
* Map-specific settings through custom fields
* Location search and easy marker positioning
* Easy shortcode copying from the map editor
* Gutenberg block support
* Elementor widget support
* Classic WordPress widget support
* WPBakery Page Builder support

**▶️ Watch the Video**

[youtube https://www.youtube.com/watch?v=pxeGCNc9Be0]

== Gutenberg, Elementor & Widget Support ==

CBX Map integrates with popular WordPress content-building tools.

* **Gutenberg Block** — Add maps directly from the WordPress block editor.
* **Elementor** — Add maps using an Elementor widget.
* **Classic Widget** — Add maps through the traditional WordPress widget.
* **WPBakery Page Builder** — Add maps using a WPBakery element.

== Shortcode ==

The simplest way to display a saved map is:

`[cbxgooglemap id="123"]`

Replace `123` with the ID of a map created using the **CBX Maps** custom post type.

=== Display a Saved Map ===

Once you create a map from the WordPress admin, copy its shortcode and place it anywhere that supports WordPress shortcodes.

Example:

`[cbxgooglemap id="123"]`

Only the `id` attribute is required when displaying a saved map.

=== Display a Map Without a Saved Map ===

You can also create a map directly from shortcode attributes without creating a CBX Map custom post.

Example:

`[cbxgooglemap lat="23.8103" lng="90.4125"]`

=== Shortcode Attributes ===

* `id` — Saved CBX Map post ID. Optional.
* `maptype` — Map type. Default: `roadmap`. Available values: `roadmap`, `satellite`, `hybrid`, `terrain`.
* `width` — Map width. Numeric values are treated as pixels. Percentage values such as `100%` are also supported.
* `height` — Map height in pixels.
* `zoom` — Initial map zoom level. Default: `8`.
* `lat` — Latitude of the map location. Required when using a map without a saved map post.
* `lng` — Longitude of the map location. Required when using a map without a saved map post.
* `heading` — Title displayed in the information window.
* `website` — Website URL linked from the place name in the information window. Leave empty to disable the link.
* `address` — Content displayed inside the information window.
* `scrollwheel` — Enable or disable mouse-wheel zooming. `1` = enabled, `0` = disabled.
* `showinfo` — Show or hide the information window. `1` = enabled, `0` = disabled.
* `infow_open` — Control whether the information window is initially open. `1` = open, `0` = closed.
* `mapicon` — Custom marker icon URL. Leave empty to use the default marker.

Example:

`[cbxgooglemap lat="23.8103" lng="90.4125" zoom="12" maptype="roadmap" width="100%" height="400"]`

For complete shortcode documentation and Pro features, see the [CBX Map documentation](https://codeboxr.com/doc/cbxmap-doc/).

== CBX Map Pro ==

[Get CBX Map Pro](https://codeboxr.com/product/cbx-google-map-for-wordpress/#downloadarea)

Upgrade to **CBX Map Pro** to add advanced mapping and location features.

### Pro Features

* Distance search shortcode
* Distance-based map and list display
* Display multiple map locations on a single map
* Use saved map posts as multiple markers
* Make individual maps public or private
* Map categories
* Additional shortcode options and advanced functionality

**▶️ Watch the Pro Video**

[youtube https://www.youtube.com/watch?v=bTuysIg-mho]

For complete Pro documentation and shortcode options, visit the [CBX Map documentation](https://codeboxr.com/doc/cbxmap-doc/).

== Installation ==

=== Automatic Installation ===

1. From your WordPress dashboard, go to **Plugins → Add New**.
2. Search for **CBX Map for Google Map & OpenStreetMap**.
3. Install the plugin.
4. Activate the plugin.
5. Go to the CBX Map settings and configure your preferred map provider.
6. Create a map or use the `[cbxgooglemap]` shortcode to display a map.

=== Manual Installation ===

1. Download the plugin.
2. Upload the `cbxgooglemap` folder to `/wp-content/plugins/`.
3. Activate the plugin from the **Plugins** menu in WordPress.
4. Open the CBX Map settings.
5. Configure your map provider and settings.
6. Create a map or add the shortcode to your desired page, post, widget, or supported page builder.

=== Google Maps API ===

If you use **Google Maps**, configure the required Google Maps API credentials according to Google's current API requirements.

If you use **OpenStreetMap**, a Google Maps API key is not required.

== Frequently Asked Questions ==

= Does CBX Map support OpenStreetMap? =

Yes. CBX Map supports both **Google Maps** and **OpenStreetMap**.

= Do I need a Google Maps API key? =

A Google Maps API key is required when using Google Maps, according to Google's API requirements.

If you use OpenStreetMap, you do not need a Google Maps API key.

= Can I display a map without creating a map from the admin? =

Yes. You can display a map directly using shortcode attributes such as `lat`, `lng`, `zoom`, `maptype`, `width`, and `height`.

= Can I create reusable maps? =

Yes. CBX Map provides a custom post type that allows you to create and manage reusable map locations from the WordPress admin.

= Is the map responsive? =

Yes. Maps are designed to be responsive and adapt to the available browser width.

= Does CBX Map support Gutenberg? =

Yes. CBX Map provides a Gutenberg block for adding maps directly from the WordPress block editor.

= Does CBX Map support Elementor? =

Yes. CBX Map provides an Elementor widget.

= Does CBX Map support WPBakery? =

Yes. CBX Map provides WPBakery Page Builder support.

= Is there a custom PHP function to display a map directly? =

The recommended method for displaying maps is the `[cbxgooglemap]` shortcode or the available Gutenberg, Elementor, and widget integrations.

For advanced customization, please refer to the [documentation](https://codeboxr.com/doc/cbxmap-doc/) or contact [Codeboxr support](https://codeboxr.com/contact-us).

== Screenshots ==

1. CBX Map global settings
2. CBX Map global settings — map configuration
3. CBX Maps admin listing
4. CBX Map editor
5. CBX Map editor — location and marker settings
6. CBX Map frontend
7. CBX Map Gutenberg block
8. CBX Map Elementor widget
9. CBX Map shortcode configuration
10. CBX Map information window
11. CBX Map OpenStreetMap display
12. CBX Map responsive frontend display

== Support ==

Need help with CBX Map?

* [Free Support](https://wordpress.org/support/plugin/cbxgooglemap/)
* [Documentation](https://codeboxr.com/doc/cbxmap-doc/)
* [Pro Support](https://codeboxr.com/contact-us)
* [Contact Codeboxr](https://codeboxr.com/contact-us)

== Changelog ==

= 2.0.5 =
* [improvement] WordPress 7.1 compatibility.
* [updated] Plugin Check 2.1.0 compatibility.
* [updated] Pro addon 2.0.5 released.

= 2.0.4 =
* [improvement] Improved JavaScript loading when the Google Maps API key is missing.
* [updated] Plugin Check 1.8.0 compatibility.
* [updated] Pro addon 2.0.4 released.
* [updated] Miscellaneous improvements.

= 2.0.3 =
* [improvement] Improved Pro and other plugin activation checks.
* [improvement] Improved Pro addon deactivation notice.
* [updated] Pro addon 2.0.3 released.
* [updated] Miscellaneous improvements.