-
-
Notifications
You must be signed in to change notification settings - Fork 16
JK64 Report Google Map R1 Action
If you have installed this optional plugin, you can use it to add dynamic actions that manipulate the map plugin region in a number of ways.
These actions can alternatively be implemented using your own JavaScript code but it's easier (and more future-proof) to use the Dynamic Action plugin.
- Status: Released Dec 2023
- Plugin Name: JK64 Report Google Map R1 Action
- Internal Name: COM.JK64.REPORT_GOOGLE_MAP_DA_R1
This determines what action the dynamic action will perform on or with the map. Choose one of the following actions:
- Set Option
- Search map by Address
- Get Address at Location
- Place Marker
- Go to Device Location
- Fit Bounds
- Pan To
- Restrict to Bounds
- Restrict to Bounds (strict mode)
- Load GeoJSON
- Delete All Features
- Delete Selected Features
- Click
- Show Message
- Hide Message
This modifies an attribute on the map. The value to set the option to may be derived from the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
The option you can set will be one of:
-
Clickable Icons - if false, map icons are not clickable. A map icon represents a point of interest, also known as a POI. By default map icons are clickable.
-
Disable default UI - enables/disables all default UI controls. Each control can be overridden individually.
-
Full Screen control - enable/disable the Fullscreen control.
-
Gesture Handling - controls how the API handles gestures on the map. Allowed values:
-
cooperative
: Scroll events and one-finger touch gestures scroll the page, and do not zoom or pan the map. Two-finger touch gestures pan and zoom the map. Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode the map cooperates with the page. -
greedy
: All touch gestures and scroll events pan or zoom the map. -
none
: The map cannot be panned or zoomed by user gestures. -
auto
: (default) Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or in an iframe.
-
-
Heading - set the Google Map
heading
property - the heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available. -
Keyboard shortcuts - if false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.
-
Map Type control - enable/disable the Map type control.
-
Map Type - change the current map Type shown to
hybrid
,roadmap
,satellite
, orterrain
-
Maximum Zoom level - the maximum zoom level which will be displayed on the map. Valid values: Integers between zero, and up to the supported maximum zoom level.
-
Minimum Zoom level - the minimum zoom level which will be displayed on the map. Valid values: Integers between zero, and up to the supported maximum zoom level.
-
Restrict search to Country - set a country code to restrict subsequent calls to the Search map by Address action / gotoAddress API. May be a country name or a two letter ISO 3166-1 country code.
-
Rotate control - enable/disable the Rotate control.
-
Scale control - enable/disable the Scale control.
-
Street View Pegman control - enable/disable the Street View Pegman control.
-
Styles - styles (json) to apply to each of the default map types. Note that for satellite/hybrid and terrain modes, these styles will only apply to labels and geometry.
-
Tilt - Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45. The value 0 causes the map to always use a 0° overhead view regardless of the zoom level and viewport. The value 45 causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels.
-
Zoom level - change the map zoom level. Valid values: Integers between zero, and up to the supported maximum zoom level.
-
Zoom control - enable/disable the Zoom control.
This runs the gotoAddress API for the address indicated by the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
PRE-REQUISITE: to use Geocoding you must enable the Geocoding API on your Google Cloud Platform project. Read "Getting started" at https://developers.google.com/maps/documentation/javascript/geocoding to enable the Geocoding API.
This runs the getAddressByPos API for the lat/long indicated by the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
PRE-REQUISITE: to use Geocoding you must enable the Geocoding API on your Google Cloud Platform project. Read "Getting started" at https://developers.google.com/maps/documentation/javascript/geocoding to enable the Geocoding API.
This runs the gotoPosByString API to put a pin on the map. The lat/long or address is derived from the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
This runs the geolocate API to search for the user device's location using navigator.geolocation.getCurrentPosition, if possible (and allowed by the user). This does not actually change the map on its own; you need to add an event handler to the map to respond to the geolocate event, e.g. to zoom or pan the map to the device's location.
TODO: this action was misnamed, it should be "Get Device Location".
PRE-REQUISITE: to use Geocoding you must enable the Geocoding API on your Google Cloud Platform project. Read "Getting started" at https://developers.google.com/maps/documentation/javascript/geocoding to enable the Geocoding API.
This runs the fitBounds API for the lat/long bounds indicated by the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
The value of a lat/long bounds must conform to the LatLngBoundsLiteral object. If provided via JavaScript expression, the object should be composed as a JavaScript object literal, e.g. {north:-10, south:-44, west:110, east:155}
. Otherwise, the value should be provided as a valid JSON string, e.g. {"north":-10, "south":-44, "west":110, "east":155}
.
This runs the panToByString API to pan the map to the lat/long given by the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
This restricts the map to the lat/long bounds given by the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
The value of a lat/long bounds must conform to the LatLngBoundsLiteral object. If provided via JavaScript expression, the object should be composed as a JavaScript object literal, e.g. {north:-10, south:-44, west:110, east:155}
. Otherwise, the value should be provided as a valid JSON string, e.g. {"north":-10, "south":-44, "west":110, "east":155}
.
The user will be able to pan around the map as long as at least part of the bounds are shown somewhere in the region.
Same as Restrict to Bounds, but the user will not be able to pan the map to see anywhere outside the bounds set.
This runs the loadGeoJsonString API to load a set of features specified in a GeoJSON object. The geoJson document is derived from the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
This runs the deleteAllFeatures API to remove all GeoJSON features from the map.
This runs the deleteSelectedFeatures API to remove any selected GeoJSON features from the map. The user can select one or more features by first clicking on them.
Search the report for a pin by its ID value, and "click" it.
This runs the showMessage API to show a Warning/Error message. The message is shown in a light yellow box centered left in the viewing window. The message is derived from the triggering element (e.g. an item on the page), a specified item on the page, a static value, a JavaScript expression, or jQuery selector.
This runs the hideMessage API to hide the Warning/Error message.
Determine how the value needed by the action is to be derived.
Get the value of the item that the dynamic action is triggered by.
Get the value of some other item on the page.
Get the value of an object selected using a jQuery selector.
Derive the value using a JavaScript expression.
Provide a single static value. Substitution syntax is allowed, e.g. &P1_ITEM.
- note that this is determined when the page is rendered on the server.
Must be set to the JK64 Google Map Plugin region.