Hi, I used mapstraction v1 in a generic map module for the CMS zikula (http://code.zikula.org/mymap) and now I saw that v1 is not really up to date any more. Due to a lack of time I could not really follow all the posts from the mailing list. Now my question: Is there a little tutorial or a howto anywhere in the web about the changes and the steps that need to be changed in html and js code not to use v1 but v2 of mapstraction? I hope switching from v1 to v2 is not very difficult... Thanks for your replies, Florian
Hi Florian, It''s pretty easy to switch between v1 and v2 of Mapstraction. I''ll outline the big things below and maybe others on the list can jump in and fill in what I''ve missed. Most of the code between the versions is backwards compatible. The biggest changes are the way the Mapstraction code is included and how the Mapstraction classes are initialized. Instead of a single mapstraction.js file, Mapstraction is now made up of multiple files. You''ll need at least three: mxn.js mxn.core.js mxn.PROVIDER.js Where PROVIDER is whichever map you''re using (google, googlev3, yahoo, etc). But you only need to include mxn.js with the providers you want to load in parentheses: mxn.js?(googlev3, yahoo) Once you have the code loaded, you''ll need to add "mxn." in front of your old class declarations (Mapstraction, LatLonPoint, Marker, Polyline, BoundingBox). So, the following: var map = new Mapstraction(''mapdiv'', ''google''); Becomes: var map = new mxn.Mapstraction(''mapdiv'', ''google''); Give this a shot and let us know where there are problems. It would be great to get v1 folks on to v2, so your experience could help us find the areas that are difficult. On Sat, Aug 14, 2010 at 3:54 PM, Florian Schie?l < florian.schiessl at ifs-net.de> wrote:> Hi, > > I used mapstraction v1 in a generic map module for the CMS zikula ( > http://code.zikula.org/mymap) and now I saw that v1 is not really up to > date any more. Due to a lack of time I could not really follow all the posts > from the mailing list. > > Now my question: Is there a little tutorial or a howto anywhere in the web > about the changes and the steps that need to be changed in html and js code > not to use v1 but v2 of mapstraction? I hope switching from v1 to v2 is not > very difficult... > > Thanks for your replies, Florian > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100815/803b6f2b/attachment.htm>
Thank you very much for your help, Adam. I will try to move the code to v2 the next few weeks - time is actuallly a problem for me :-/ I''ll let you know about success or I''ll ask the mailinglist again if I need some more help. Thanks, Flo Am 15.08.2010 19:12, schrieb Adam DuVander:> Hi Florian, > > It''s pretty easy to switch between v1 and v2 of Mapstraction. I''ll > outline the big things below and maybe others on the list can jump in > and fill in what I''ve missed. > > Most of the code between the versions is backwards compatible. The > biggest changes are the way the Mapstraction code is included and how > the Mapstraction classes are initialized. > > Instead of a single mapstraction.js file, Mapstraction is now made up of > multiple files. You''ll need at least three: > mxn.js > mxn.core.js > mxn.PROVIDER.js > > Where PROVIDER is whichever map you''re using (google, googlev3, yahoo, > etc). But you only need to include mxn.js with the providers you want to > load in parentheses: > mxn.js?(googlev3, yahoo) > > Once you have the code loaded, you''ll need to add "mxn." in front of > your old class declarations (Mapstraction, LatLonPoint, Marker, > Polyline, BoundingBox). So, the following: > var map = new Mapstraction(''mapdiv'', ''google''); > > Becomes: > var map = new mxn.Mapstraction(''mapdiv'', ''google''); > > Give this a shot and let us know where there are problems. It would be > great to get v1 folks on to v2, so your experience could help us find > the areas that are difficult. > > > > On Sat, Aug 14, 2010 at 3:54 PM, Florian Schie?l > <florian.schiessl at ifs-net.de <mailto:florian.schiessl at ifs-net.de>> wrote: > > Hi, > > I used mapstraction v1 in a generic map module for the CMS zikula > (http://code.zikula.org/mymap) and now I saw that v1 is not really > up to date any more. Due to a lack of time I could not really follow > all the posts from the mailing list. > > Now my question: Is there a little tutorial or a howto anywhere in > the web about the changes and the steps that need to be changed in > html and js code not to use v1 but v2 of mapstraction? I hope > switching from v1 to v2 is not very difficult... > > Thanks for your replies, Florian > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > <mailto:Mapstraction at lists.mapstraction.com> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >
On Sun, Aug 15, 2010 at 1:12 PM, Adam DuVander <mapstraction at duvander.com> wrote:> Hi Florian, > It''s pretty easy to switch between v1 and v2 of Mapstraction. I''ll outline > the big things below and maybe others on the list can jump in and fill in > what I''ve missed.You may want to update the examples on the web site to reflect this. All the current examples use Mapstraction 1.0. - Serge