I'm creating a directive to integrate leaflet.js maps as a datatype. However, when the map loads, it only loads 1 tile. If I resize the browser window, it reloads all tiles correctly.
I've tried a local version of this in a vanilla angularjs app and it works fine, which makes me think something is not initializing correctly.
Is there some umbraco event I can fire to force the page to re-paint or something!?
Please help.
Thanks, Simon
here's my code (which works fine outside of umbraco).
solved it in a rather rubbish way, but works. It seems like when the directive is loaded there's still some umbraco gubbins going on in the background.
I just used angular $timeout to call the map giving it a delay
leaflet.js maps not loading correctly
I'm creating a directive to integrate leaflet.js maps as a datatype. However, when the map loads, it only loads 1 tile. If I resize the browser window, it reloads all tiles correctly. I've tried a local version of this in a vanilla angularjs app and it works fine, which makes me think something is not initializing correctly. Is there some umbraco event I can fire to force the page to re-paint or something!? Please help. Thanks, Simon
here's my code (which works fine outside of umbraco).
solved it in a rather rubbish way, but works. It seems like when the directive is loaded there's still some umbraco gubbins going on in the background. I just used angular $timeout to call the map giving it a delay
any better ideas?
is working on a reply...