Skip to content

Latest commit

 

History

History
93 lines (65 loc) · 2.97 KB

index.md

File metadata and controls

93 lines (65 loc) · 2.97 KB

Rendering (Helper)

Rendering maps or place autocompletes is very simple but need to be well understood. When you render something, it is always in two steps (except for static map rendering). In the first step, we render maps and place autocompletes javascript code. Each rendering is automatically wrapped into a unique named functions meaning maps and place autocompletes have not been instantiated at this state (only defined). Then, at the second step, we render the API javascript code which loads the Google API and automatically calls all map and place autocomplete functions previously defined (only when the required libraries have been loaded).

The API rendering must always be done after all objects (maps and place autocompletes) have been rendered.

If you want to learn more about each rendering, you can read the following:

Render Map

Here, an example rendering a map:

use Ivory\GoogleMap\Helper\Builder\ApiHelperBuilder;
use Ivory\GoogleMap\Helper\Builder\MapHelperBuilder;
use Ivory\GoogleMap\Map;

$map = new Map();