You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering whether it would make sense to equip mxn with a dynamic map provider script loader so as to remove the requirement that you have to load the specific provider map script url in the html page yourself.
This could also make it possible to programmatically load a map in a web2.0 type app only after some user action rather than having to load the script from the start.
Let me know, and close this if this is not something you wish to look into at this stage.
Patrick
It's something we've looked at in the past but not done as there are quite a lot of variables involved such as the actual URL you load your provider API from depending on whether you use the free or paid version of it, your API key if there is one and also the issue of having to cater for provider API loading characteristics e.g. whether they load multiple scripts etc.
It may be worth looking at again - in the meantime though most of the big JavaScript libraries support lazy loading of script in the way you describe so it's possible to achieve that without it being part of Mapstraction albeit with a bit more code.
This is being actively worked on and (in general) for all supported providers at a high level it works. @gilesc50 and myself are now going through each providers source implementation and making the changes needed. Check out the release-3.0-autoload branch to see current progress. This will be part of the forthcoming v3.0 release of Mapstraction.
Activity
dezfowler commentedon Feb 25, 2012
It's something we've looked at in the past but not done as there are quite a lot of variables involved such as the actual URL you load your provider API from depending on whether you use the free or paid version of it, your API key if there is one and also the issue of having to cater for provider API loading characteristics e.g. whether they load multiple scripts etc.
It may be worth looking at again - in the meantime though most of the big JavaScript libraries support lazy loading of script in the way you describe so it's possible to achieve that without it being part of Mapstraction albeit with a bit more code.
vicchi commentedon Sep 7, 2013
This is being actively worked on and (in general) for all supported providers at a high level it works. @gilesc50 and myself are now going through each providers source implementation and making the changes needed. Check out the
release-3.0-autoloadbranch to see current progress. This will be part of the forthcoming v3.0 release of Mapstraction.