本文整理汇总了PHP中FusionCore_Plugin::rgb2hsl方法的典型用法代码示例。如果您正苦于以下问题:PHP FusionCore_Plugin::rgb2hsl方法的具体用法?PHP FusionCore_Plugin::rgb2hsl怎么用?PHP FusionCore_Plugin::rgb2hsl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FusionCore_Plugin
的用法示例。
在下文中一共展示了FusionCore_Plugin::rgb2hsl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
//.........这里部分代码省略.........
// generate a unique ID for this map
$this->map_id = $map_id;
ob_start();
?>
<script type="text/javascript">
var map_<?php
echo $map_id;
?>
;
var markers = [];
var counter = 0;
function fusion_run_map_<?php
echo $map_id;
?>
() {
jQuery('#<?php
echo $map_id;
?>
').fusion_maps({
addresses: <?php
echo $json_addresses;
?>
,
animations: <?php
echo $animation == 'yes' ? 'true' : 'false';
?>
,
infobox_background_color: '<?php
echo $infobox_background_color;
?>
',
infobox_styling: '<?php
echo $infobox;
?>
',
infobox_text_color: '<?php
echo $infobox_text_color;
?>
',
map_style: '<?php
echo $map_style;
?>
',
map_type: '<?php
echo $type;
?>
',
marker_icon: '<?php
echo $icon;
?>
',
overlay_color: '<?php
echo $overlay_color;
?>
',
overlay_color_hsl: <?php
echo json_encode(FusionCore_Plugin::rgb2hsl($overlay_color));
?>
,
pan_control: <?php
echo $zoom_pancontrol == 'yes' ? 'true' : 'false';
?>
,
show_address: <?php
echo $popup == 'yes' ? 'true' : 'false';
?>
,
scale_control: <?php
echo $scale == 'yes' ? 'true' : 'false';
?>
,
scrollwheel: <?php
echo $scrollwheel == 'yes' ? 'true' : 'false';
?>
,
zoom: <?php
echo $zoom;
?>
,
zoom_control: <?php
echo $zoom_pancontrol == 'yes' ? 'true' : 'false';
?>
,
});
}
google.maps.event.addDomListener(window, 'load', fusion_run_map_<?php
echo $map_id;
?>
);
</script>
<?php
if ($defaults['id']) {
$html = ob_get_clean() . sprintf('<div id="%s"><div %s></div></div>', $defaults['id'], FusionCore_Plugin::attributes('google-map-shortcode'));
} else {
$html = ob_get_clean() . sprintf('<div %s></div>', FusionCore_Plugin::attributes('google-map-shortcode'));
}
}
return $html;
}
示例2: render
//.........这里部分代码省略.........
,
zoomControl: <?php
echo $zoom_pancontrol == 'yes' ? 'true' : 'false';
?>
};
map_<?php
echo $map_id;
?>
= new google.maps.Map(document.getElementById("<?php
echo esc_attr($map_id);
?>
"), map_options);
<?php
$i = 0;
?>
<?php
foreach ($coordinates as $key => $coordinate) {
$infobox_content = trim(self::$args['infobox_content'][$key]);
$infobox_content_arr = explode("\n", $infobox_content);
$infobox_content_arr = array_filter($infobox_content_arr, 'trim');
$infobox_content = implode('', $infobox_content_arr);
$infobox_content = str_replace("\r", '', $infobox_content);
$infobox_content = str_replace("\n", '', $infobox_content);
?>
var content_string = "<div class='info-window'><?php
echo $infobox_content;
?>
</div>";
<?php
if ($overlay_color && $map_style == 'custom') {
$hsl = FusionCore_Plugin::rgb2hsl($overlay_color);
?>
var styles = [
{
stylers: [
{ hue: '<?php
echo $overlay_color;
?>
' },
<?php
if (self::$args['map_style'] == 'custom') {
?>
{ saturation: '<?php
echo $hsl['sat'] * 2 - 100;
?>
' },
{ lightness: '<?php
echo $hsl['lum'] * 2 - 100;
?>
' }
<?php
} elseif (self::$args['map_style'] == 'theme') {
?>
{ saturation: '-20' },
<?php
}
?>
]
},{
featureType: "road",
elementType: "geometry",
stylers: [
{ visibility: "simplified" }