Version:
Popular examples
Map
Geo objects
Balloon and hint
Controls
Hotspots
Regions
Clustering
GeoQuery
Behaviors and events
Search on a map
Traffic
User's location
Routing
YMapsML
GeoXML
ObjectManager
Modular system
Panoramas
External modules

Loading the module on demand

Save as filesEdit on JSFiddle
In this example, only the map and button modules are loaded during initialization.
The placemark module is loaded when the button is clicked.
You can load separate modules using the require method in the modular system.
The method returns a promise object that is resolved by an array of requested modules.
For convenience, the example uses the 'spread' method, which passes the function the data as a list of arguments, not as an array.

The Yandex.Maps API consists of a large number of interrelated modules.
By default, when the API is enabled, it loads a standard set of modules (package.full), which includes everything that is necessary for using the API.
To reduce the amount of API code that is loaded, you can enable certain modules instead of the full set.
You can do this by specifying the desired modules in the 'load' GET parameter. Modules are specified as a comma-separated list.
If the 'load' GET parameter isn't specified, package.full is loaded.
For more information aobut modules, see the Modules section.