Angular factory

NgMapPool source

Provide map instance to avoid memory leak

Members

mapInstances

map instance pool

Methods

getMapInstance (el)

Parameters:
NameTypeDescription
el HtmlElement

map container element

Returns:
TypeDescription

map instance for the given element

returnMapInstance (an)

sets the flag inUse of the given map instance to false, so that it can be reused later

Parameters:
NameTypeDescription
an Map

instance of google.maps.Map