About IBS Mappro internals

There is the one mandatory PHP file and it serves mainly as a file server for the JavaScript .

There are no HTML files nor a large amount or HTML in the PHP code. The HTML is generated in jQuery as the instance is initialized.

The generated HTML uses few tag ids. Instead class naming class scoping is used. The other alternative was to create a schema for creating unique tag ids for running multiple instances. Each instance is created as a new IBS_MAPPRO({args., a, a…}); with one unique DIV and tag id.

When there are multiple instances they are daisy chained in their initialization. The the first instance when its initialization has completed triggers the next instance (sn++) and this process continues until the last instance.

During initialization there are points where listeners are used to pause before continuing the process. Googe Maps API to be loaded.

The HTML is built, a wait for Google Maps to load, and finally instantiate event handlers

Except for JavaScript utility functions the code is encapsulated in JavaScript objects and prototype extensions.