To change the area/polygon colors and opacity, do the following:
- Edit your map
- Scroll down to the widget “Draw a Search Settings” and click on the menu “Draw a map search”.
- To change the style used when starting to add new polygons to the map, click on the group field “Add New” Polygon style and change in the settings available inside the group field.
- To change the style used when when starting to edit existing polygons, click on the group field “Edit” Polygon style and change in the settings available inside the group field.
- To change the style used when statring to delete polygons from the map, click on the group field “Delete” Polygon style and change in the settings available inside the group field.
- To change the style used when highlighting an existing polygon on the map, click on the group field “Highlight” Polygon style and change in the settings available inside the group field.
The plugin offers the ability to automatically display areas on the map as soon as it loads, a feature we refer to as “Pre-Drawn Areas”. This functionality allows you to add predefined areas and initiate a search request immediately upon map load. However, providing a Pre-Drawn Area is optional, as users can still create their own areas using the drawing tools.
To set up a Pre-Drawn Area, follow these steps:
Step 1: Enable the tool “Draw a Map Search”
- Edit your map and open the “Draw a Search Settings” widget.
- Navigate to the “Draw a Map Search” menu.
- Set the “Draw a map search option” field to “Yes”.
Step 2: Add and Configure Areas
- Scroll to the “Pre-Drawn Areas” section. Click on the group field “Area 1” or “Add new area” for additional areas.
- In the “Area name” field, enter the area’s name or title.
- Enter the area coordinates in the “Area/Polygon Paths” field using the format [Lat,Lng] or [Lng,Lat]. Example:
[45.5215,-1.5245],[41.2587,-1.2479],[40.1649,-1.9879]
Select the coordinates format in the field “LatLngs order”. Refer to the instructions in “Step 4” below to ensure the proper placement and display of your areas!
- In the “Visibility” field, choose whether the area should be visible by default on the map by selecting either “Show” or “Hide”.
Step 3: Adding More Areas
Click “Add new area” and repeat the steps above for additional areas, or save your map settings if you’ve finished adding areas.
Step 4: Verify Areas Placement
To ensure that the added areas appear correctly on the frontend map, it is important to confirm that the coordinates are in the “Latitude” followed by “Longitude” format. If you have copied coordinates from a service, they are likely in reverse order (“Longitude, Latitude”), which may cause the polygons to display incorrectly or not appear at all.
To resolve this issue, follow these steps:
-
- After adding your areas, save the map settings.
- Revisit the map settings and review each area by opening the area widget to confirm their placement on the map.
- If an area is misplaced, it may have reversed coordinates. In this case, click the “Reverse coordinates” button at the top of the map. This tool quickly reverses the order of all area vertices.
- Once the area appears correctly on the map, click “Update/Display polygon coordinates” to save the changes.
- Save your map settings after verifying the placement of all areas.
By taking these steps, you ensure your areas are displayed accurately on the frontend map.
To automatically open the drawing tools area once the map is loaded, do the following:
- Edit your map
- Scroll down to the widget “Draw a Search Settings” and cick on the menu “Draw a map search”.
- In the field “Display status”, select the option “Yes”.
This guide will walk you through configuring and enabling the “Draw a Search” tool for your map.
- Edit Your Map
- Scroll down to the widget labeled “Draw a Search Settings” and click on the menu “Draw a Map Search”.
- Enable the Tool
- In the field “Draw a Map Search Option”, select “Yes”.
- Choose a Drawing Method
- In the field “Drawing Method”, select your preferred method:
- Click to Draw: Allows users to create an area by clicking multiple points on the map.
- Freehand Drawing: Enables users to draw an area by clicking and dragging the cursor over the desired zone.
- Configure the Heatmap Layer: When a user starts to draw, all markers and clusters will be hidden from the map. Enabling the heatmap layer allows the user to gain insight into the areas on the map that contain markers.
- To enable the heatmap layer, select “Yes”
- To disable the heatmap layer, choose “No”.
- Make sure to enable the heatmap layer by navigating to “Progress Map Settings => Heatmap Layer Settings”. Click here to learn how! #
- Set the Display Status
- To automatically open the drawing tools when the map loads, set the “Display Status” field to “Yes”.