iniamudhan / react-bingmaps

Bingmaps in React.js
MIT License
26 stars 42 forks source link

OnLoad callback #30

Open TomasPlatzer opened 5 years ago

TomasPlatzer commented 5 years ago

Would it be possible to add some OnLoad callback which would have Microsoft object from window and reference map object as the parameters ?

This would be very helpful, because any missing functionality could be added inside host react component.

What I mean is something like this:

        if(!map[mapReference]){
            map[mapReference] = new Microsoft.Maps.Map(mapReference, {
                credentials: bingmapKey
            });
            if(props.onLoad){
                props.onLoad(Microsoft, map[mapReference]);
            }
        }