Skip to content

Commit 1c26464

Browse files
committed
Helper improvements
1 parent 4f72411 commit 1c26464

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

inc/Helpers/Waymark_GeoJSON.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ static public function string_to_feature_collection(String $string = '') {
1919
/**
2020
* Get count of features in a GeoJSON array
2121
*
22-
* @param array $FeatureCollection GeoJSON array
23-
* @return int Count of features
22+
* @param array|string $FeatureCollection GeoJSON array or string
23+
* @return integer|boolean Count of features or false
2424
*/
25-
static public function get_feature_count(Array $FeatureCollection = []) {
25+
static public function get_feature_count(Mixed $FeatureCollection = []) {
2626
if (is_string($FeatureCollection)) {
2727
$FeatureCollection = self::string_to_feature_collection($FeatureCollection);
2828
}

inc/Helpers/Waymark_Helper.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ public static function type_to_text(String $feature_type = '', Array $type_data
13511351
* Each overlay has a title, description and image
13521352
*
13531353
* @param array $overlays An array containing 'marker' => [ $markers ], 'line' => [ $lines ], 'shape' => [ $shapes ]
1354-
* @return string
1354+
* @return string HTML
13551355
* @since 2024.1
13561356
* @access public
13571357
* @static
@@ -1408,9 +1408,9 @@ public static function overlays_list_html(Array $overlays = []) {
14081408
$icon_html = self::build_icon_html($icon_data);
14091409

14101410
$out .= ' <div class="waymark-header" style="background-color:' . $type_data['marker_colour'] . ';color:' . $type_data['icon_colour'] . ';">' . "\n";
1411-
$out .= ' <div class="waymark-icon">' . $icon_html . '</div>' . "\n";
1412-
$out .= ' <div class="waymark-title">' . $type_data['marker_title'] . '</div>' . "\n";
1413-
$out .= ' <div class="waymark-count">' . sizeof($markers) . '</div>' . "\n";
1411+
$out .= ' <div class="waymark-type-icon">' . $icon_html . '</div>' . "\n";
1412+
$out .= ' <div class="waymark-type-title">' . $type_data['marker_title'] . '</div>' . "\n";
1413+
$out .= ' <div class="waymark-type-count">' . sizeof($markers) . '</div>' . "\n";
14141414
$out .= ' </div>' . "\n";
14151415

14161416
// Iterate over markers

0 commit comments

Comments
 (0)