add support for custom handlers for adding layers to the map