Hi as I dive in lots of questions come up. thanks for your patience (and help) a. how do I edit/what is the protocol for editing http://mapstraction.appspot.com/#mapstraction_v2 to fix the v2 example it currently is: function initialize() { var mapstraction = new mxn.Mapstraction(''map_canvas'',''google''); mapstraction.setCenterAndZoom(38,-120,12); } but should be: function initialize() { var m = new mxn.Mapstraction(''map_canvas'',''google''); m.setCenterAndZoom(new mxn.LatLonPoint(38,-120), 10); } b. what is the best way to change a Marker''s image? I''ve tried adding a new Icon (via marker.setIcon) and then addMarker again, but this seems to leave visual clutter especially if I do it repeatedly. eventually the icon becomes just a black blob, which isn''t really what I want c. has anyone gotten setHoverIcon to work for a google map? For me it fails silently. thanks for your help, Ed
sorry to keep hammering with questions, all help much appreciated a. in mxn.Marker we create a pinID for each marker via some computation. this pinID is then never used. new-host-5: 19:59:19-->pwd ~/mapstraction-read-only/source new-host-5: 20:00:31-->grep pinID * mxn.core.js: this.pinID = "mspin-"+new Date().getTime()+''-''+(Math.floor(Math.random()*Math.pow(2,16))); new-host-5: 20:00:33--> seems like unneeded cycles, or am I missing something? why penalize everyone? anyone who wants a unique id can use Marker.setAttribute to create one b. I see one example html file using mxnv2 via this syntax: script src="../source/mxn.js?(google, yahoo, microsoft)" in other cases mxn.js mxn.core.js and mxn.google.js are called explicitly. To reduce http requests, we''d like to cat all of the scripts we need into one single file (along with our own javascript). The problem when I do this is that mxn.js seems to be trying to load mxn.yahoo.js, mxn.microsoft.js, etc Is there a way to do this? thanks for your attention On Tue, Aug 25, 2009 at 18:08, Ed Freyfogle<edf at sloan.mit.edu> wrote:> Hi > as I dive in lots of questions come up. thanks for your patience (and help) > > a. how do I edit/what is the protocol for editing > http://mapstraction.appspot.com/#mapstraction_v2 to fix the v2 example > > it currently is: > function initialize() { > ? ?var mapstraction = new mxn.Mapstraction(''map_canvas'',''google''); > ? ?mapstraction.setCenterAndZoom(38,-120,12); > } > > but should be: > function initialize() { > ? ?var m = new mxn.Mapstraction(''map_canvas'',''google''); > ? ?m.setCenterAndZoom(new mxn.LatLonPoint(38,-120), 10); > } > > > b. what is the best way to change a Marker''s image? I''ve tried adding > a new Icon (via marker.setIcon) and then addMarker again, but this > seems to leave visual clutter especially if I do it repeatedly. > eventually the icon becomes just a black blob, which isn''t really what > I want > > c. has anyone gotten setHoverIcon to work for a google map? For me it > fails silently. > > thanks for your help, > Ed >
Regarding the pinID, I think this is something Virtual Earth required. Since not much has changed in the switch to Bing, my guess is that it would still be required. There may be a way to move the pin generation code to happen only in mxn.microsoft.js. --Adam --- Adam DuVander I like maps: http://mapscripting.com I like simple: http://adamduvander.com On Aug 25, 2009, at 12:03 PM, Ed Freyfogle wrote:> sorry to keep hammering with questions, all help much appreciated > > a. in mxn.Marker we create a pinID for each marker via some > computation. this pinID is then never used. > > new-host-5: 19:59:19-->pwd > ~/mapstraction-read-only/source > new-host-5: 20:00:31-->grep pinID * > mxn.core.js: this.pinID = "mspin-"+new > Date().getTime()+''-''+(Math.floor(Math.random()*Math.pow(2,16))); > new-host-5: 20:00:33--> > > seems like unneeded cycles, or am I missing something? why penalize > everyone? anyone who wants a unique id can use Marker.setAttribute > to create one > > b. > > I see one example html file using mxnv2 via this syntax: > > script src="../source/mxn.js?(google, yahoo, microsoft)" > > in other cases mxn.js mxn.core.js and mxn.google.js are called > explicitly. > > To reduce http requests, we''d like to cat all of the scripts we need > into one single file (along with our own javascript). The problem when > I do this is that mxn.js seems to be trying to load mxn.yahoo.js, > mxn.microsoft.js, etc > > Is there a way to do this? > > thanks for your attention > > > On Tue, Aug 25, 2009 at 18:08, Ed Freyfogle<edf at sloan.mit.edu> wrote: >> Hi >> as I dive in lots of questions come up. thanks for your patience >> (and help) >> >> a. how do I edit/what is the protocol for editing >> http://mapstraction.appspot.com/#mapstraction_v2 to fix the v2 >> example >> >> it currently is: >> function initialize() { >> var mapstraction = new mxn.Mapstraction(''map_canvas'',''google''); >> mapstraction.setCenterAndZoom(38,-120,12); >> } >> >> but should be: >> function initialize() { >> var m = new mxn.Mapstraction(''map_canvas'',''google''); >> m.setCenterAndZoom(new mxn.LatLonPoint(38,-120), 10); >> } >> >> >> b. what is the best way to change a Marker''s image? I''ve tried adding >> a new Icon (via marker.setIcon) and then addMarker again, but this >> seems to leave visual clutter especially if I do it repeatedly. >> eventually the icon becomes just a black blob, which isn''t really >> what >> I want >> >> c. has anyone gotten setHoverIcon to work for a google map? For me it >> fails silently. >> >> thanks for your help, >> Ed >> > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com
Catching up on the discussions. Ed, you added a (none) support, right? Seems like the default with no specified provider should infact be (none). The convenience helper of doing the explicit (google,yahoo) is very nice, but perhaps confusing to either new users, or even more advanced ones that run into conflicts when compressing. On Tue, Aug 25, 2009 at 3:03 PM, Ed Freyfogle <edf at sloan.mit.edu> wrote:> sorry to keep hammering with questions, all help much appreciated > > a. in mxn.Marker we create a pinID for each marker via some > computation. this pinID is then never used. > > new-host-5: 19:59:19-->pwd > ~/mapstraction-read-only/source > new-host-5: 20:00:31-->grep pinID * > mxn.core.js: ? ?this.pinID = "mspin-"+new > Date().getTime()+''-''+(Math.floor(Math.random()*Math.pow(2,16))); > new-host-5: 20:00:33--> > > seems like unneeded cycles, or am I missing something? why penalize > everyone? anyone who wants a unique id can use Marker.setAttribute > to create one > > b. > > I see one example html file using mxnv2 via this syntax: > > script src="../source/mxn.js?(google, yahoo, microsoft)" > > in other cases mxn.js mxn.core.js and mxn.google.js are called explicitly. > > To reduce http requests, we''d like to cat all of the scripts we need > into one single file (along with our own javascript). The problem when > I do this is that mxn.js seems to be trying to load mxn.yahoo.js, > mxn.microsoft.js, etc > > Is there a way to do this? > > thanks for your attention > > > On Tue, Aug 25, 2009 at 18:08, Ed Freyfogle<edf at sloan.mit.edu> wrote: >> Hi >> as I dive in lots of questions come up. thanks for your patience (and help) >> >> a. how do I edit/what is the protocol for editing >> http://mapstraction.appspot.com/#mapstraction_v2 to fix the v2 example >> >> it currently is: >> function initialize() { >> ? ?var mapstraction = new mxn.Mapstraction(''map_canvas'',''google''); >> ? ?mapstraction.setCenterAndZoom(38,-120,12); >> } >> >> but should be: >> function initialize() { >> ? ?var m = new mxn.Mapstraction(''map_canvas'',''google''); >> ? ?m.setCenterAndZoom(new mxn.LatLonPoint(38,-120), 10); >> } >> >> >> b. what is the best way to change a Marker''s image? I''ve tried adding >> a new Icon (via marker.setIcon) and then addMarker again, but this >> seems to leave visual clutter especially if I do it repeatedly. >> eventually the icon becomes just a black blob, which isn''t really what >> I want >> >> c. has anyone gotten setHoverIcon to work for a google map? For me it >> fails silently. >> >> thanks for your help, >> Ed >> > _______________________________________________ > 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
mxn.js?(none) mxn.js?() and mxn.js should now no longer load any further scripts. Cheers, Rob 2009/10/3 Andrew Turner <andrew at highearthorbit.com>> Catching up on the discussions. > > Ed, you added a (none) support, right? Seems like the default with no > specified provider should infact be (none). The convenience helper of > doing the explicit (google,yahoo) is very nice, but perhaps confusing > to either new users, or even more advanced ones that run into > conflicts when compressing. > > > > On Tue, Aug 25, 2009 at 3:03 PM, Ed Freyfogle <edf at sloan.mit.edu> wrote: > > sorry to keep hammering with questions, all help much appreciated > > > > a. in mxn.Marker we create a pinID for each marker via some > > computation. this pinID is then never used. > > > > new-host-5: 19:59:19-->pwd > > ~/mapstraction-read-only/source > > new-host-5: 20:00:31-->grep pinID * > > mxn.core.js: this.pinID = "mspin-"+new > > Date().getTime()+''-''+(Math.floor(Math.random()*Math.pow(2,16))); > > new-host-5: 20:00:33--> > > > > seems like unneeded cycles, or am I missing something? why penalize > > everyone? anyone who wants a unique id can use Marker.setAttribute > > to create one > > > > b. > > > > I see one example html file using mxnv2 via this syntax: > > > > script src="../source/mxn.js?(google, yahoo, microsoft)" > > > > in other cases mxn.js mxn.core.js and mxn.google.js are called > explicitly. > > > > To reduce http requests, we''d like to cat all of the scripts we need > > into one single file (along with our own javascript). The problem when > > I do this is that mxn.js seems to be trying to load mxn.yahoo.js, > > mxn.microsoft.js, etc > > > > Is there a way to do this? > > > > thanks for your attention > > > > > > On Tue, Aug 25, 2009 at 18:08, Ed Freyfogle<edf at sloan.mit.edu> wrote: > >> Hi > >> as I dive in lots of questions come up. thanks for your patience (and > help) > >> > >> a. how do I edit/what is the protocol for editing > >> http://mapstraction.appspot.com/#mapstraction_v2 to fix the v2 example > >> > >> it currently is: > >> function initialize() { > >> var mapstraction = new mxn.Mapstraction(''map_canvas'',''google''); > >> mapstraction.setCenterAndZoom(38,-120,12); > >> } > >> > >> but should be: > >> function initialize() { > >> var m = new mxn.Mapstraction(''map_canvas'',''google''); > >> m.setCenterAndZoom(new mxn.LatLonPoint(38,-120), 10); > >> } > >> > >> > >> b. what is the best way to change a Marker''s image? I''ve tried adding > >> a new Icon (via marker.setIcon) and then addMarker again, but this > >> seems to leave visual clutter especially if I do it repeatedly. > >> eventually the icon becomes just a black blob, which isn''t really what > >> I want > >> > >> c. has anyone gotten setHoverIcon to work for a google map? For me it > >> fails silently. > >> > >> thanks for your help, > >> Ed > >> > > _______________________________________________ > > 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 > _______________________________________________ > 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/20091114/3167c4d4/attachment.htm>