Hi, I''d like to ask, whether it''s possible to create implementation for own map service in mapstraction. I''ve been looking into the code and found out that each map service is integrated into mapstraction as one switch branch in all mapstraction methods. So I assume that adding of new implementation into mapstraction means adding one switch branch into each method. I''m I correct or is there any workaround? Thanks! Regards, tomas
That''s pretty much all it needs. Which service were you considering adding? Cheers, Rob Rob Moran Technical Development Manager Opportunity Links, Trust Court, The Vision Park, Histon, Cambridge, CB24 9PW T 01223 566 522 F 01223 500 281 www.opp-links.org.uk Opportunity Links LTD registered in England no: 3565647. Registered Office: Trust Court, The Vision Park, Histon, Cambs. CB24 9PW This email message is private and for use by the addressee only. It may contain information, which is privileged and confidential. If you receive this in error please return to sender by reply and delete the message from your computer. You are not authorised to and must not disclose, copy, distribute or retain the message or any part of it. -----Original Message----- From: mapstraction-bounces at lists.mapstraction.com [mailto:mapstraction-bounces at lists.mapstraction.com] On Behalf Of Tom?? Drenc?k Sent: 29 October 2008 05:39 To: mapstraction at lists.mapstraction.com Subject: [Mapstraction] Extending mapstraction Hi, I''d like to ask, whether it''s possible to create implementation for own map service in mapstraction. I''ve been looking into the code and found out that each map service is integrated into mapstraction as one switch branch in all mapstraction methods. So I assume that adding of new implementation into mapstraction means adding one switch branch into each method. I''m I correct or is there any workaround? Thanks! Regards, tomas _______________________________________________ Mapstraction mailing list Mapstraction at lists.mapstraction.com http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com
Hi, I''m creating own map service implementation and considering javascript interface to it. As I see mapstraction has nice API, but it''s little bit hard to extend it the current way. What I''ve seen in similar frameworks (such as java''s Swing), that there is AbstractFactory design pattern, when exists multiple implementations for the same API. I''ve tried similar approach on mapstraction by separating Yahoo maps into single class which extends Mapstraction and it looks and works quite fine. Would it be worth to refactor Mapstraction this way? I you''ll be interested, I would do it. Example of separate MapstractionYahoo class is in the attachment. Now I can create Mapstraction object by calling: var mapstraction = MapstractionFactory("myElement", {api:"yahoo"}); or var mapstraction = new MapstractionYahoo("myElement"); This way anybody can take benefits of using mapstraction API. Just subclassing of the Mapstraction is necessary... Regards, tomas Rob Moran wrote / nap?sal(a):> That''s pretty much all it needs. Which service were you considering adding? > > Cheers, > > Rob > > Rob Moran > Technical Development Manager > Opportunity Links, Trust Court, The Vision Park, Histon, Cambridge, CB24 9PW > T 01223 566 522 F 01223 500 281 www.opp-links.org.uk > Opportunity Links LTD registered in England no: 3565647. Registered Office: Trust Court, The Vision Park, Histon, Cambs. CB24 9PW > > This email message is private and for use by the addressee only. It may contain information, which is privileged and confidential. If you receive this in error please return to sender by reply and delete the message from your computer. You are not authorised to and must not disclose, copy, distribute or retain the message or any part of it. > -----Original Message----- > From: mapstraction-bounces at lists.mapstraction.com [mailto:mapstraction-bounces at lists.mapstraction.com] On Behalf Of Tom?? Drenc?k > Sent: 29 October 2008 05:39 > To: mapstraction at lists.mapstraction.com > Subject: [Mapstraction] Extending mapstraction > > Hi, > I''d like to ask, whether it''s possible to create implementation for own > map service in mapstraction. I''ve been looking into the code and found > out that each map service is integrated into mapstraction as one switch > branch in all mapstraction methods. So I assume that adding of new > implementation into mapstraction means adding one switch branch into > each method. I''m I correct or is there any workaround? Thanks! > > Regards, > tomas > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-------------- next part -------------- A non-text attachment was scrubbed... Name: mapstraction-yahoo.js Type: application/x-javascript Size: 16200 bytes Desc: not available URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20081029/41f43ad4/attachment.js>
Hello everybody, I''m developing the map-based system and try to allow switching of map provider using Mapstraction. The idea of Tomas seems good to me, this would improve extensibility. This pattern could also be applied to map objects (for example, the instance of google map generates and processes google marker), which is less obvious. Some concern here is multiple js files (which are convinient to store different implementations), though on the other hand it is a benefit, as we have to include only those implementations, which we need. What is also interesting is dynamic loading of provider''s script. I''ve succeed with google and map24 yet using jQuery.getScript() and callback functions, but yahoo is still a problem. Would also like to participate, if necessary, and start from Map24. Regards, Konstantin. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20081110/e9235a8c/attachment.htm>
Hi Konstantin - first off, can you subscribe to the list? Your message was on hold because you weren''t a subscriber. Second - thank you for bringing this idea back up. I have been pondering it and meaning to get back to the list. I think the proposed architecture is definitely a good move and would to get going on it as soon as possible. There are many more people using Mapstraction and running into the various issues raised here with file size, complexity, etc. You''re right that multiple JS includes would be onerous - however we can address this by having the JS includes write themselves as necessary when a user uses or switches to a provider (both the provider''s js as well as the Mapstraction provider wrapper js) I would prefer not to use jQuery or any other dependent library. It''s possible to do this in simple Javascript. This is what I''ve used in the past: function script( url ) { document.write( ''<script type="text/javascript" src="'', url, ''">'', ''<\/script>'' ); } script("http://load/external.js"); Does someone want to head up the re-design - get the initial pieces into place and others can then sign-up for implementing specific providers? I''m hoping to get more people actively involved in maintaining the project so that it''s not all coming through a single (busy) channel. :) Thanks - Andrew 2008/11/10 Konstantin Pestrikov <pestrikov at magenta-technology.ru>:> Hello everybody, > > I''m developing the map-based system and try to allow switching of map > provider using Mapstraction. > > > > The idea of Tomas seems good to me, this would improve extensibility. This > pattern could also be applied to map objects (for example, the instance of > google map generates and processes google marker), which is less obvious. > > Some concern here is multiple js files (which are convinient to store > different implementations), though on the other hand it is a benefit, as we > have to include only those implementations, which we need. > > What is also interesting is dynamic loading of provider''s script. I''ve > succeed with google and map24 yet using jQuery.getScript() and callback > functions, but yahoo is still a problem. > > Would also like to participate, if necessary, and start from Map24. > > > > Regards, Konstantin. > > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Andrew Turner mobile: 248.982.3609 andrew at fortiusone.com http://highearthorbit.com http://geocommons.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
Wasn''t an architecture following a bridge pattern recently suggested? I will gladly undertake google implementations, but my time is also limited :( Im sure there are better developers than me who could head up the main architecture design, but I can help. I love the idea of writing in the file dependecies, very neat. With a good push from the community this can be made an awesome library with some great ideas! Rob ________________________________ From: mapstraction-bounces at lists.mapstraction.com on behalf of Andrew Turner Sent: Mon 01/12/2008 14:06 To: Konstantin Pestrikov Cc: mapstraction at lists.mapstraction.com Subject: Re: [Mapstraction] Extending mapstraction Hi Konstantin - first off, can you subscribe to the list? Your message was on hold because you weren''t a subscriber. Second - thank you for bringing this idea back up. I have been pondering it and meaning to get back to the list. I think the proposed architecture is definitely a good move and would to get going on it as soon as possible. There are many more people using Mapstraction and running into the various issues raised here with file size, complexity, etc. You''re right that multiple JS includes would be onerous - however we can address this by having the JS includes write themselves as necessary when a user uses or switches to a provider (both the provider''s js as well as the Mapstraction provider wrapper js) I would prefer not to use jQuery or any other dependent library. It''s possible to do this in simple Javascript. This is what I''ve used in the past: function script( url ) { document.write( ''<script type="text/javascript" src="'', url, ''">'', ''<\/script>'' ); } script("http://load/external.js"); Does someone want to head up the re-design - get the initial pieces into place and others can then sign-up for implementing specific providers? I''m hoping to get more people actively involved in maintaining the project so that it''s not all coming through a single (busy) channel. :) Thanks - Andrew 2008/11/10 Konstantin Pestrikov <pestrikov at magenta-technology.ru>:> Hello everybody, > > I''m developing the map-based system and try to allow switching of map > provider using Mapstraction. > > > > The idea of Tomas seems good to me, this would improve extensibility. This > pattern could also be applied to map objects (for example, the instance of > google map generates and processes google marker), which is less obvious. > > Some concern here is multiple js files (which are convinient to store > different implementations), though on the other hand it is a benefit, as we > have to include only those implementations, which we need. > > What is also interesting is dynamic loading of provider''s script. I''ve > succeed with google and map24 yet using jQuery.getScript() and callback > functions, but yahoo is still a problem. > > Would also like to participate, if necessary, and start from Map24. > > > > Regards, Konstantin. > > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Andrew Turner mobile: 248.982.3609 andrew at fortiusone.com http://highearthorbit.com <http://highearthorbit.com/> http://geocommons.com <http://geocommons.com/> Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography _______________________________________________ Mapstraction mailing list Mapstraction at lists.mapstraction.com http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com