Skip to content

Hooks: Maps

Type: Filter

File: classes/class-immomakler.php:4819

Signature:

apply_filters( 'immomakler_address_visible', $address_visible, $openimmo_data, $immobilie )

Type: Filter

File: skins/bootstrap3/functions.php:2154

Signature:

apply_filters( 'immomakler_distances_unit', 'km', $post_id )

Type: Filter

Since: 5.68.0

Description:

Filters which provider answers one geo service.

File: src-plus/Geo/Provider_Resolver.php:113

Signature:

apply_filters( 'immomakler_geo_provider', $chosen, $service, $providers )

Parameters:

  • $chosen (string) Provider id from the settings, may be empty.
  • $service (string) Service key: geocoding, static_map or autocomplete.
  • $providers (array<string,Contract\Geo_Provider_Interface>) Registered providers, keyed by id.

Type: Action

Since: 5.68.0

Description:

Fires once, so a site can add or replace geo-service providers.

Registering under an existing id replaces that provider, which is how a site swaps our Google implementation for its own.

File: src-plus/Geo/Provider_Registry.php:194

Signature:

do_action( 'immomakler_geo_register_providers', $this )

Parameters:

  • $registry (Provider_Registry) The registry being built.

Type: Filter

Since: 5.70.0

Description:

Filters whether a geo request that is not cached may go out.

Only asked on a cache miss, i.e. for a request the provider bills. The radius search hooks in here for the duration of one lookup to hold a visitor to their allowance; a refused request is not cached.

File: src-plus/Geo/Http/Geo_Http_Client.php:90

Signature:

apply_filters( 'immomakler_geo_request_allowed', true, $url )

Parameters:

  • $allowed (bool) Whether the request may be made. Default true.
  • $url (string) The request URL, API key included.

Type: Filter

File: classes/class-immomakler.php:4862

Signature:

apply_filters( 'immomakler_geocode_address', true )

Additional usage locations:

  • src/Cron/Events/Geocode_Missing_Coordinates.php:35

    apply_filters( 'immomakler_geocode_address', true )

Type: Filter

File: classes/class-immomakler.php:4878

Signature:

apply_filters( 'immomakler_geocode_address_if_hidden', false )

Additional usage locations:

  • classes/class-immomakler.php:4893

    apply_filters( 'immomakler_geocode_address_if_hidden', false )
  • src/Google_Maps/Geocoder.php:143

    apply_filters( 'immomakler_geocode_address_if_hidden', false )

Type: Filter

File: src/Google_Maps/Geocoder.php:564

Signature:

apply_filters( 'immomakler_geocode_result', null, $address, $bias )

Type: Filter

File: classes/class-immomakler.php:4893

Signature:

apply_filters( 'immomakler_geocode_sublocality', true )

Type: Filter

File: classes/class-immomakler.php:4868

Signature:

apply_filters( 'immomakler_geocode_with_bundesland', false )

Additional usage locations:

  • src-plus/PDF/Pdf_Builder_Dompdf.php:2275

    apply_filters( 'immomakler_geocode_with_bundesland', false )
  • src/Google_Maps/Geocoder.php:135

    apply_filters( 'immomakler_geocode_with_bundesland', false )

Type: Filter

File: src/Google_Maps/Geocoder.php:306

Signature:

apply_filters( 'immomakler_geocoding_address', $address )

Type: Filter

Since: 5.68.0

Description:

Filters whether geocoding is possible at all.

File: src/Google_Maps/Geocoder.php:102

Signature:

apply_filters( 'immomakler_geocoding_available', $google )

Parameters:

  • $available (bool) Whether Google is switched on and keyed.

Type: Filter

File: classes/class-immomakler-options.php:187

Signature:

apply_filters( 'immomakler_googlemaps_api_key', '' )

Additional usage locations:

  • classes/class-immomakler-options.php:188

    apply_filters( 'immomakler_googlemaps_api_key', '' )
  • src/Google_Maps/Settings.php:514

    apply_filters( 'immomakler_googlemaps_api_key', '' )
  • src/Google_Maps/Settings.php:669

    apply_filters( 'immomakler_googlemaps_api_key', '' )

Type: Filter

File: src/Google_Maps/Single_Map.php:59

Signature:

apply_filters( 'immomakler_map_address_with_bundesland', true )

Type: Filter

File: src/Google_Maps/Single_Map.php:56

Signature:

apply_filters( 'immomakler_map_address_with_sublocality', false )

Type: Filter

Since: 5.68.0

Description:

Filter the radius drawn around a marker whose address is not exact.

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:235

Signature:

apply_filters( 'immomakler_map_blur_radius_km', $options->float( 'map_blur_radius_km' ) )

Parameters:

  • $kilometres (float) Radius in kilometres. Zero draws no circle.

Type: Filter

Since: 5.67.0

Description:

Filter the Borlabs content-blocker id the map is wrapped in.

Deliberately still googlemaps by default, even when another engine draws the map: the id has to match a blocker the site actually configured in Borlabs, and an unknown one is not blocked at all. A site running MapLibre or Mapbox that has set up its own blocker points this at it.

File: src-plus/Frontend/Map/Container/Map_Container_Renderer.php:268

Signature:

apply_filters( 'immomakler_map_borlabs_blocker', 'googlemaps', null !== $engine ? $engine->id() : 'google' )

Parameters:

  • $blocker_id (string) Borlabs content blocker id.
  • $engine_id (string) Engine drawing this map.

Type: Filter

Since: 5.67.0

Description:

Filter the map settings offered on each builder module.

Applies to every builder at once, since they all render this one list.

File: src-plus/Frontend/Map/Settings/Builder_Controls.php:123

Signature:

apply_filters( 'immomakler_map_builder_controls', $controls, $this->context )

Parameters:

  • $controls (array<int,array<string,mixed>>) Normalised definitions.
  • $context (string) Which kind of map is asking.

Type: Filter

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:311

Signature:

apply_filters( 'immomakler_map_cluster_markers', true )

Additional usage locations:

  • src-plus/Frontend/Map/Settings/Map_Settings_Schema.php:399

    apply_filters( 'immomakler_map_cluster_markers', true )

Type: Filter

Description:

Filter the map’s JavaScript configuration.

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:193

Signature:

apply_filters( 'immomakler_map_config', $config )

Parameters:

  • $config (array<string,mixed>) The config object handed to the map adapter.

Type: Filter

Since: 5.68.0

Description:

Filters the service a map’s consent box names.

File: src/Google_Maps/Map_Availability.php:92

Signature:

apply_filters( 'immomakler_map_consent_descriptor', self::google_consent(), $overrides )

Parameters:

  • $consent (array<string,string>) Descriptor with key, provider and privacy_url.
  • $overrides (array<string,mixed>) Settings the one map carries.

Type: Filter

Since: 5.68.0

Description:

Filters the engine a map resolves to once fallbacks are applied.

File: src/Google_Maps/Map_Availability.php:333

Signature:

apply_filters( 'immomakler_map_drawing_engine', self::site_engine() )

Parameters:

  • $engine (string) Engine id, the site’s own choice by default.

Type: Filter

Description:

Filter which engine a map renders with.

File: src-plus/Frontend/Map/Engine/Engine_Resolver.php:168

Signature:

apply_filters( 'immomakler_map_engine', $id, $context )

Parameters:

  • $id (string) Engine id resolved so far.
  • $context (array<string,mixed>) Render context.

Type: Filter

Since: 5.68.0

Description:

Filters whether the site’s map engine is ready to draw.

File: src/Google_Maps/Map_Availability.php:385

Signature:

apply_filters( 'immomakler_map_engine_configured', $google )

Parameters:

  • $configured (bool) Whether Google’s browser key is entered.

Type: Filter

Description:

Filter the GeoJSON marker collection a map plots.

File: src-plus/Frontend/Map/Data/Marker_Collection_Builder.php:105

Signature:

apply_filters( 'immomakler_map_features', $collection, $atts )

Parameters:

  • $collection (array<string,mixed>) A GeoJSON FeatureCollection.
  • $atts (array<string,mixed>) The query args the markers were loaded for.

Type: Filter

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:360

Signature:

apply_filters( 'immomakler_map_fitbounds', true )

Type: Filter

File: src/Google_Maps/Settings.php:579

Signature:

apply_filters( 'immomakler_map_force_googlemaps_embed', false )

Type: Filter

Description:

Filter the registered script handles the map frame prints.

File: src-plus/Frontend/Map/Frame/Frame_Renderer.php:161

Signature:

apply_filters( 'immomakler_map_frame_scripts', [] )

Parameters:

  • $handles (array<int,string>) Registered script handles.

Type: Filter

File: src-plus/Frontend/Map/Container/Map_Container_Renderer.php:281

Signature:

apply_filters( 'immomakler_map_html', $map_html, false )

Additional usage locations:

  • src/Google_Maps/Single_Map.php:219

    apply_filters( 'immomakler_map_html', $map_html, $is_google_embed )

Type: Filter

Since: 5.68.0

Description:

Filters how wide a shaded area may be before the map leaves it out.

File: src-plus/Frontend/Map/Data/Place_Id_Resolver.php:309

Signature:

apply_filters( 'immomakler_map_max_area_radius', $radius, $layer )

Parameters:

  • $radius (float) Equal-area radius in metres.
  • $layer (string) Feature layer the area belongs to, so a site can tune postal codes and towns apart.

Type: Filter

Since: 5.54

Description:

Filters whether the map frame renders without checking its referer.

The frame redirects to the property archive unless it is requested from a page of this site. Return true for setups whose referer never arrives, for example behind a proxy that strips it.

File: src-plus/Frontend/Map/Container/Map_Container_Renderer.php:81

Signature:

apply_filters( 'immomakler_map_noredirect', Frame_Request::is_current_block_editor_preview() )

Parameters:

  • $noredirect (bool) Whether to skip the referer check. Default false, true in the block editor’s preview of a block.

Additional usage locations:

  • src-plus/Frontend/Map/Map_Hooks.php:265

    apply_filters( 'immomakler_map_noredirect', Frame_Request::is_current_block_editor_preview() )

Type: Filter

Since: 5.69.0

Description:

Filters whether a property’s coordinates mark its exact position.

Decides how the property is drawn wherever its position is shown: an exact position gets a plain marker the map may frame closely, an approximate one gets the “position approximate” note, the radius circle or the shaded postal-code area, and a wider frame.

By default a position is exact when a house number is stored. Return true for properties whose coordinates are known to be exact although their address carries no house number.

File: src/Google_Maps/Position_Accuracy.php:59

Signature:

apply_filters( 'immomakler_map_position_is_exact', $exact, $post_id, $secret )

Parameters:

  • $exact (bool) Whether the position is exact.
  • $post_id (int) Property post ID.
  • $secret (bool) Whether the secret address is in effect for this reader.

Type: Filter

Description:

Filter the properties plotted on a map.

File: src-plus/Frontend/Map/Data/Property_Locations_Repository.php:124

Signature:

apply_filters( 'immomakler_map_property_locations', $locations, $atts )

Parameters:

  • $locations (array<int,array<string,mixed>>) One record per geocoded property.
  • $atts (array<string,mixed>) The query args the records were loaded for.

Type: Action

Description:

Register additional map engines.

File: src-plus/Frontend/Map/Engine/Engine_Registry.php:143

Signature:

do_action( 'immomakler_map_register_engines', $this )

Parameters:

  • $registry (Engine_Registry) The registry to add engines to.

Type: Filter

Since: 5.68.0

Description:

Filters the frame the single map renders, and the identity it claims.

File: src/Google_Maps/Map_Availability.php:205

Signature:

apply_filters( 'immomakler_map_single_frame', [ 'url' => '', 'key' => '', 'suffix' => '', ], $post_id, $geolocation, $overrides )

Parameters:

  • $post_id (int) Property being mapped.
  • $overrides (array<string,mixed>) Settings this one map carries.

immomakler_map_single_use_geocoordinates_only

Section titled “immomakler_map_single_use_geocoordinates_only”

Type: Filter

File: src/Google_Maps/Single_Map.php:83

Signature:

apply_filters( 'immomakler_map_single_use_geocoordinates_only', false, $post_id )

Type: Filter

Since: 5.68.0

Description:

Filters the map engine this site draws with.

Deliberately the site’s own engine rather than the one a given map resolves to: an instance override or the immomakler_map_engine filter can send one map somewhere else, and that is not an answer about the site.

A site that never opened the control has still chosen nothing, and Plus answers with the engine its credentials point at — not with a fixed google, which claimed a decision nobody made. Switching maps off is its own value, none, so no credential can do it by accident.

File: src/Google_Maps/Map_Availability.php:53

Signature:

apply_filters( 'immomakler_map_site_engine', 'google' )

Parameters:

  • $engine (string) Engine id.

Type: Filter

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:390

Signature:

apply_filters( 'immomakler_map_start_center', $center )

Type: Filter

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:343

Signature:

apply_filters( 'immomakler_map_start_zoom', 15 )

Type: Filter

File: src-plus/Frontend/Map/Config/Map_Config_Builder.php:336

Signature:

apply_filters( 'immomakler_map_start_zoom_single', $exact_address ? self::ZOOM_SINGLE_EXACT : self::ZOOM_SINGLE_APPROXIMATE, $exact_address )

Additional usage locations:

  • src/Google_Maps/Single_Map.php:106

    apply_filters( 'immomakler_map_start_zoom_single', 15 )

Type: Filter

Since: 5.67.0

Description:

Filter the notice shown above the admin test map.

File: src/Google_Maps/Map_Availability.php:404

Signature:

apply_filters( 'immomakler_map_test_notice', '' )

Parameters:

  • $notice (string) Notice text, empty when there is nothing to say.

Type: Filter

Since: 5.67.0

Description:

Filter the colour treatments a basemap can be drawn with.

Each entry needs a label and a filter, the latter being a CSS filter value applied to the map’s tile pane.

File: src-plus/Frontend/Map/Engine/Tile_Filters.php:101

Signature:

apply_filters( 'immomakler_map_tile_filters', $filters )

Parameters:

  • $filters (array<string,array<string,mixed>>) Treatments keyed by id.

Type: Filter

Since: 5.67.0

Description:

Filter the tile providers a map can be drawn from.

Each entry needs at least label, url, maxZoom and attribution. Optional: subdomains, key_placeholder, notice.

File: src-plus/Frontend/Map/Engine/Tile_Providers.php:135

Signature:

apply_filters( 'immomakler_map_tile_providers', $providers )

Parameters:

  • $providers (array<string,array<string,mixed>>) Providers keyed by id.

Type: Filter

Since: 5.68.0

Description:

Filter the vector styles a GL map can be drawn from.

Each entry needs engine (mapbox or maplibre), label, url, provider and privacy_url. Optional: notice.

File: src-plus/Frontend/Map/Engine/Vector_Styles.php:238

Signature:

apply_filters( 'immomakler_map_vector_styles', $styles )

Parameters:

  • $styles (array<string,array<string,mixed>>) Styles keyed by id.

immomakler_places_autocomplete_auto_enqueue

Section titled “immomakler_places_autocomplete_auto_enqueue”

Type: Filter

File: src-plus/Search/Places_Autocomplete_Bootstrap.php:99

Signature:

apply_filters( 'immomakler_places_autocomplete_auto_enqueue', true )

immomakler_places_autocomplete_debounce_ms

Section titled “immomakler_places_autocomplete_debounce_ms”

Type: Filter

File: src-plus/Headless/Query/Places_Config.php:52

Signature:

apply_filters( 'immomakler_places_autocomplete_debounce_ms', 140 )

Additional usage locations:

  • src-plus/Search/Places_Autocomplete_Bootstrap.php:119

    apply_filters( 'immomakler_places_autocomplete_debounce_ms', 140 )

immomakler_places_autocomplete_max_results

Section titled “immomakler_places_autocomplete_max_results”

Type: Filter

File: src-plus/Headless/Query/Places_Config.php:51

Signature:

apply_filters( 'immomakler_places_autocomplete_max_results', 8 )

Additional usage locations:

  • src-plus/Search/Places_Autocomplete_Bootstrap.php:118

    apply_filters( 'immomakler_places_autocomplete_max_results', 8 )

Type: Filter

File: src-plus/Headless/Query/Places_Config.php:50

Signature:

apply_filters( 'immomakler_places_autocomplete_min_length', 3 )

Additional usage locations:

  • src-plus/Search/Places_Autocomplete_Bootstrap.php:117

    apply_filters( 'immomakler_places_autocomplete_min_length', 3 )

Type: Filter

Since: 5.70.0

Description:

Filters how many billed address lookups one client may trigger per hour.

Applies to the radius search’s address suggestions on every transport, including the standalone Fast-API proxy. Return 0 to switch the limit off.

File: src-plus/Search/Places_Autocomplete_Rate_Limit.php:84

Signature:

apply_filters( 'immomakler_places_autocomplete_rate_limit', self::DEFAULT_LIMIT )

Parameters:

  • $limit (int) Lookups per client and hour. Default 600.

Type: Filter

Since: 5.68.0

Description:

Filters the rectangle address suggestions are biased or restricted to.

File: src-plus/Geo/Autocomplete_Context.php:84

Signature:

apply_filters( 'immomakler_places_location_config', null )

Parameters:

  • $location (mixed) Location config, or null for no bias at all.

Type: Filter

File: src-plus/Search/Places_Autocomplete_Endpoints.php:142

Signature:

apply_filters( 'immomakler_places_token_ttl', Places_Token_Issuer::DEFAULT_TTL )

Type: Filter

Since: 5.68.0

Description:

Filters the rectangle the radius search prefers its centre inside.

File: src-plus/Search/Radius_Search.php:543

Signature:

apply_filters( 'immomakler_radiussearch_geocoding_bias', $bounds )

Parameters:

  • $bounds (array|null) Rectangle as min_lat, max_lat, min_lng, max_lng, or null for none.

Type: Filter

Since: 5.68.0

Description:

Filters the controls a single-map element offers.

File: src/Google_Maps/Map_Availability.php:246

Signature:

apply_filters( 'immomakler_single_map_controls', [], $builder )

Parameters:

  • $controls (array<string,mixed>) Empty list.
  • $builder (string) Builder id.

Type: Filter

Since: 5.68.0

Description:

Filters the attribute defaults a single-map element declares.

File: src/Google_Maps/Map_Availability.php:270

Signature:

apply_filters( 'immomakler_single_map_defaults', [], $builder )

Parameters:

  • $defaults (array<string,mixed>) Empty list.
  • $builder (string) Builder id.

Type: Filter

Since: 5.68.0

Description:

Filters the overrides a single-map element’s settings amount to.

File: src/Google_Maps/Map_Availability.php:292

Signature:

apply_filters( 'immomakler_single_map_overrides', [], $settings, $builder )

Parameters:

  • $overrides (array<string,mixed>) Empty list.
  • $settings (array<string,mixed>) The element’s saved settings.
  • $builder (string) Builder id.

Type: Filter

Since: 5.71.0

Description:

Filters the attribution printed into a map used as a link preview.

Empty for services that draw their attribution into the image themselves, which Google does.

File: src/Frontend/Archive/Location_Map_Image.php:508

Signature:

apply_filters( 'immomakler_static_map_attribution', '' )

Parameters:

  • $attribution (string) Plain text attribution.

Type: Filter

Since: 5.68.0

Description:

Filters the static-map image URL, so a service other than Google can draw it.

The seam exists because this class ships in every edition while the providers are Plus-only: src/ cannot reference src-plus/, so the Plus side hooks in rather than being called. Returning anything other than a non-empty string leaves the Google path untouched, which is why Basic keeps behaving exactly as before.

Whatever comes back is downloaded and cached like any other map image, so the caller cannot tell which service produced it.

File: src/Frontend/Archive/Location_Map_Image.php:451

Signature:

apply_filters( 'immomakler_static_map_url', null, [ 'lat' => $viewport['lat'], 'lng' => $viewport['lng'], 'zoom' => min( 20, $viewport['zoom'] + 1 ), 'size' => self::WIDTH . 'x' . self::HEIGHT, ] )

Parameters:

  • $url (string|null) Override URL, or null to let Google draw it.
  • $viewport (array) Center, zoom and pixel size of the image wanted.

Additional usage locations:

  • src/Google_Maps/Static_Map.php:335

    apply_filters( 'immomakler_static_map_url', null, $viewport )