    import util from 'mapbox-plugins/src/util.js'

public class | source

# util

## Static Method Summary

Static Public Methods
public static | debounce(fn: *, delay: *): Function |
public static | deepClone(obj: *): * |
public static | getAnimationFrame() |
public static | getFiletype(uri: *): string |
public static | getJSON(url: *, resolve: *, reject: *): * return promise obj. |
public static | isChanged(lastData: *, data: *): boolean |
public static | loadImageAsync(url: *, resolve: *, reject: *): * compared with traditional imageload. |
public static | log(target: *, name: *, descriptor: *) target.descriptor.. |
public static | rdObjs(num: *, mapCenter: *): * |
public static | readonly(target: *, name: *, descriptor: *): * This decorator func. |
public static | setChart(dom: *, data: *, type: *, height: *) |
public static | setIconDiv(dom: *, iconName: *) return iconposition style by iconName |
public static | setResource(dom,: *domEle, res,: *Array) add img, video element to domContainer. |

## Static Public Methods

### public static debounce(fn: *, delay: *): Function source

#### Params:

Name | Type | Attribute | Description
fn | * |  | {Function}
delay | * |  | {Number}

#### Return:

Function

### public static deepClone(obj: *): * source

#### Params:

Name | Type | Attribute | Description
obj | * |  |

#### Return:

*

### public static getAnimationFrame() source

### public static getFiletype(uri: *): string source

#### Params:

Name | Type | Attribute | Description
uri | * |  |

#### Return:

string

### public static getJSON(url: *, resolve: *, reject: *): * source

return promise obj.

#### Params:

Name | Type | Attribute | Description
url | * |  |
resolve | * |  |
reject | * |  |

#### Return:

*

### public static isChanged(lastData: *, data: *): boolean source

#### Params:

Name | Type | Attribute | Description
lastData | * |  |
data | * |  |

#### Return:

boolean

### public static loadImageAsync(url: *, resolve: *, reject: *): * source

compared with traditional imageload. what is the advantage ?

#### Params:

Name | Type | Attribute | Description
url | * |  |
resolve | * |  |
reject | * |  |

#### Return:

*

### public static log(target: *, name: *, descriptor: *) source

target.descriptor.. this decorator used for log before calling target function.

#### Params:

Name | Type | Attribute | Description
target | * |  |
name | * |  |
descriptor | * |  |

### public static rdObjs(num: *, mapCenter: *): * source

#### Params:

Name | Type | Attribute | Description
num | * |  |
mapCenter | * |  |

#### Return:

*

### public static readonly(target: *, name: *, descriptor: *): * source

This decorator func.

#### Params:

Name | Type | Attribute | Description
target | * |  |
name | * |  |
descriptor | * |  |

#### Return:

*

### public static setChart(dom: *, data: *, type: *, height: *) source

#### Params:

Name | Type | Attribute | Description
dom | * |  |
data | * |  |
type | * |  |
height | * |  |

### public static setIconDiv(dom: *, iconName: *) source

return iconposition style by iconName

#### Params:

Name | Type | Attribute | Description
dom | * |  |
iconName | * |  |

### public static setResource(dom,: *domEle, res,: *Array) source

add img, video element to domContainer.

#### Params:

Name | Type | Attribute | Description
dom, | *domEle |  | dom container..
res, | *Array |  | urls of img/video loaded to dom.