array( array( 'featureType' => 'all', 'elementType' => 'all', 'stylers' => array( array('saturation' => '32'), array('lightness' => '-3'), array('visibility' => 'on'), array('weight' => '1.18'), ), ), array( 'featureType' => 'administrative', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'landscape', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'landscape.man_made', 'elementType' => 'all', 'stylers' => array( array('saturation' => '-70'), array('lightness' => '14'), ), ), array( 'featureType' => 'poi', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'road', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'transit', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'water', 'elementType' => 'all', 'stylers' => array( array('saturation' => '100'), array('lightness' => '-14'), ), ), array( 'featureType' => 'water', 'elementType' => 'labels', 'stylers' => array( array('visibility' => 'off'), array('lightness' => '12'), ), ), ), 'light' => array( array( 'featureType' => 'administrative', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'on')), ), array( 'featureType' => 'administrative.country', 'elementType' => 'geometry.stroke', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'administrative.province', 'elementType' => 'geometry.stroke', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'landscape', 'elementType' => 'geometry', 'stylers' => array( array('visibility' => 'on'), array('color' => '#e3e3e3'), ), ), array( 'featureType' => 'landscape.natural', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'on')), ), array( 'featureType' => 'poi', 'elementType' => 'all', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'road', 'elementType' => 'all', 'stylers' => array(array('color' => '#cccccc')), ), array( 'featureType' => 'road', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'transit', 'elementType' => 'labels.icon', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'transit.line', 'elementType' => 'geometry', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'transit.line', 'elementType' => 'labels.text', 'stylers' => array(array('visibility' => 'on')), ), array( 'featureType' => 'transit.station.airport', 'elementType' => 'geometry', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'transit.station.airport', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'on')), ), array( 'featureType' => 'water', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#FFFFFF')), ), array( 'featureType' => 'water', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'on')), ), ), 'dark' => array( array( 'featureType' => 'all', 'elementType' => 'labels.text.fill', 'stylers' => array( array('saturation' => 36), array('color' => '#707070'), array('lightness' => 40), ), ), array( 'featureType' => 'all', 'elementType' => 'labels.text.stroke', 'stylers' => array( array('visibility' => 'on'), array('color' => '#000000'), array('lightness' => 16), ), ), array( 'featureType' => 'all', 'elementType' => 'labels.icon', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'administrative', 'elementType' => 'geometry.fill', 'stylers' => array( array('color' => '#000000'), array('lightness' => 20), ), ), array( 'featureType' => 'administrative', 'elementType' => 'geometry.stroke', 'stylers' => array( array('color' => '#000000'), array('lightness' => 17), array('weight' => 1.2), ), ), array( 'featureType' => 'landscape', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#424242')), ), array( 'featureType' => 'poi', 'elementType' => 'geometry', 'stylers' => array( array('color' => '#000000'), array('lightness' => 21), ), ), array( 'featureType' => 'poi', 'elementType' => 'labels', 'stylers' => array(array('visibility' => 'on')), ), array( 'featureType' => 'poi', 'elementType' => 'labels.icon', 'stylers' => array(array('visibility' => 'off')), ), array( 'featureType' => 'road.highway', 'elementType' => 'geometry.fill', 'stylers' => array( array('lightness' => 17), array('color' => '#484848'), ), ), array( 'featureType' => 'road.highway', 'elementType' => 'geometry.stroke', 'stylers' => array( array('lightness' => 29), array('weight' => 0.2), array('color' => '#ff0000'), array('visibility' => 'off'), ), ), array( 'featureType' => 'road.arterial', 'elementType' => 'geometry', 'stylers' => array( array('color' => '#000000'), array('lightness' => 18), ), ), array( 'featureType' => 'road.local', 'elementType' => 'geometry', 'stylers' => array( array('color' => '#000000'), array('lightness' => 16), ), ), array( 'featureType' => 'transit', 'elementType' => 'geometry', 'stylers' => array( array('color' => '#000000'), array('lightness' => 19), ), ), array( 'featureType' => 'water', 'elementType' => 'geometry', 'stylers' => array( array('color' => '#000000'), array('lightness' => 17), ), ), ), 'pale_dawn' => array( array( 'featureType' => 'administrative', 'elementType' => 'all', 'stylers' => array( array('visibility' => 'on'), array('lightness' => 33), ), ), array( 'featureType' => 'landscape', 'elementType' => 'all', 'stylers' => array(array('color' => '#f2e5d4')), ), array( 'featureType' => 'poi.park', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#c5dac6')), ), array( 'featureType' => 'poi.park', 'elementType' => 'labels', 'stylers' => array( array('visibility' => 'on'), array('lightness' => 20), ), ), array( 'featureType' => 'road', 'elementType' => 'all', 'stylers' => array(array('lightness' => 20)), ), array( 'featureType' => 'road.highway', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#c5c6c6')), ), array( 'featureType' => 'road.arterial', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#e4d7c6')), ), array( 'featureType' => 'road.local', 'elementType' => 'geometry', 'stylers' => array(array('color' => '#fbfaf7')), ), array( 'featureType' => 'water', 'elementType' => 'all', 'stylers' => array( array('visibility' => 'on'), array('color' => '#acbcc9'), ), ), ), ); $xero_google_map_block_id = $attributes['blockId'] ?? ''; $xero_google_map_api_key = get_option('wpxero_google_maps_api_key', ''); // No API key: render the exact same static iframe embed `save.js` produces. if (empty($xero_google_map_api_key)) { $xero_google_map_location = $attributes['location'] ?? 'New York, NY, USA'; $xero_google_map_zoom_attr = $attributes['zoom'] ?? null; $xero_google_map_zoom = is_array($xero_google_map_zoom_attr) ? ($xero_google_map_zoom_attr['value'] ?? 8) : ($xero_google_map_zoom_attr ?: 8); $xero_google_map_lang = $attributes['language'] ?? 'en'; $xero_google_map_type = $attributes['mapType'] ?? 'm'; $xero_google_map_lat = $attributes['latitude'] ?? null; $xero_google_map_lng = $attributes['longitude'] ?? null; $xero_google_map_center = ($xero_google_map_lat && $xero_google_map_lng) ? "{$xero_google_map_lat},{$xero_google_map_lng}" : '40.7128,-74.0060'; $xero_google_map_url = 'https://maps.google.com/maps?' . http_build_query(array( 'q' => $xero_google_map_location ?: 'New York', 'z' => $xero_google_map_zoom, 'output' => 'embed', 'language' => $xero_google_map_lang, 't' => $xero_google_map_type, 'markers' => $xero_google_map_center, 'hl' => $xero_google_map_lang, 'center' => $xero_google_map_center, )); $xero_google_map_no_api_style = $attributes['noApiStyle'] ?? array(); $xero_google_map_height = $xero_google_map_no_api_style['desktop']['height'] ?? ($attributes['height'] ?? 400); $xero_google_map_wrapper_attrs = get_block_wrapper_attributes(array( 'id' => $xero_google_map_block_id ? "wpxero-{$xero_google_map_block_id}" : null, 'class' => 'xero-google-map', 'style' => 'box-sizing:border-box;', )); ?>