Vito Tafuni
2010-May-24 17:35 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
i''ve found there''s a problem switching to googlev3 in my example i start with a googlev3 map, than i switch to microloft map and then back to googlev3 but the last attempt never succedes! if starting with microwoft map after switching to googlev3 the map hangs on dragging. i''ve not gone deeper into the problem hoping there''s someone who know what''s happening! a minor problem: a weight/height "declaration dropped" on resizeTo for googlev3 changing line 77 of googlev3.core.js solve the warning this.currentElement.style.width = width + "px"; this.currentElement.style.height = height + "px"; -- ----------- Tafuni Vito vito at vitotafuni.com --------------------------------------------- "Verba volant, scripta manent... data corrupted" -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100524/1ca4bf40/attachment.htm>
Ed Freyfogle
2010-May-24 17:47 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
Hi Tafuni, 2010/5/24 Vito Tafuni <vito at vitotafuni.com>:> i''ve found there''s a problem switching to googlev3 > in my example i start with a googlev3 map, than i switch to microloft map > and then back to googlev3 > but the last attempt never succedes! > if starting with microwoft map after switching to googlev3 the map hangs on > dragging. > > i''ve not gone deeper into the problem hoping there''s someone who know what''s > happening! > > > a minor problem: a weight/height "declaration dropped" on resizeTo for > googlev3 > changing line 77 of googlev3.core.js solve the warning > ??????? this.currentElement.style.width = width + "px"; > ??????? this.currentElement.style.height = height + "px"; >why not just add the "px" outside of the call and pass it "100px" or whatever as an input? this way you could also send it "100%" if you wanted? ciao, Ed> > -- > ----------- > Tafuni Vito > vito at vitotafuni.com > --------------------------------------------- > "Verba volant, scripta manent... data corrupted" > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >
Vito Tafuni
2010-May-24 18:08 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
I think that if the doc says void resizeTo(<Integer> width,<Integer> height) there''s a reason (may be a compatibility issue)! my solution was just to avoid firefox warning when my script resizes the map div based on the window dimensions... google map arranges automatically to the dimensions of the map_div while microboft map doesn''t ( and this is the only reason why i''m using resizeTo) window.addEvent(''resize'',function() { var win_size = this.getSize(); var header_size = $(''header'').getSize().y; var footer_size = $(''footer'').getSize().y; var map_size = { ''height'' : win_size.y - header_size - footer_size, ''width'' : win_size.x }; $(''body'').setStyles(map_size); map.resizeTo(map_size.width,map_size.height); }); -- ----------- Tafuni Vito vito at vitotafuni.com --------------------------------------------- "Verba volant, scripta manent... data corrupted" 2010/5/24 Ed Freyfogle <edf at sloan.mit.edu>> Hi Tafuni, > > > > 2010/5/24 Vito Tafuni <vito at vitotafuni.com>: > > i''ve found there''s a problem switching to googlev3 > > in my example i start with a googlev3 map, than i switch to microloft map > > and then back to googlev3 > > but the last attempt never succedes! > > if starting with microwoft map after switching to googlev3 the map hangs > on > > dragging. > > > > i''ve not gone deeper into the problem hoping there''s someone who know > what''s > > happening! > > > > > > a minor problem: a weight/height "declaration dropped" on resizeTo for > > googlev3 > > changing line 77 of googlev3.core.js solve the warning > > this.currentElement.style.width = width + "px"; > > this.currentElement.style.height = height + "px"; > > > > why not just add the "px" outside of the call and pass it "100px" or > whatever as an input? this way you could also send it "100%" if you > wanted? > > ciao, > Ed > > > > > > > -- > > ----------- > > Tafuni Vito > > vito at vitotafuni.com > > --------------------------------------------- > > "Verba volant, scripta manent... data corrupted" > > > > _______________________________________________ > > Mapstraction mailing list > > Mapstraction at lists.mapstraction.com > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > > > _______________________________________________ > 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/20100524/3f46dee1/attachment.htm>
Vito Tafuni
2010-May-26 15:08 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
there''s no problem swapping from microzoft to googlev3 i was making the wrong way! using the same #map div making two internal div solved the problem <div id=map><div id=map_google></div><div id=map_microsoft></div></div> ...i like to think the external div is the map container... -- ----------- Tafuni Vito vito at vitotafuni.com --------------------------------------------- "Verba volant, scripta manent... data corrupted" 2010/5/24 Vito Tafuni <vito at vitotafuni.com>> I think that if the doc says > > void resizeTo(<Integer> width,<Integer> height) > > there''s a reason (may be a compatibility issue)! > > my solution was just to avoid firefox warning when my script resizes the > map div based on the window dimensions... > google map arranges automatically to the dimensions of the map_div while > microboft map doesn''t ( and this is the only reason why i''m using resizeTo) > > window.addEvent(''resize'',function() { > var win_size = this.getSize(); > var header_size = $(''header'').getSize().y; > var footer_size = $(''footer'').getSize().y; > > var map_size = { > ''height'' : win_size.y - header_size - footer_size, > ''width'' : win_size.x > }; > > $(''body'').setStyles(map_size); > map.resizeTo(map_size.width,map_size.height); > }); > > > -- > ----------- > Tafuni Vito > vito at vitotafuni.com > --------------------------------------------- > "Verba volant, scripta manent... data corrupted" > > > 2010/5/24 Ed Freyfogle <edf at sloan.mit.edu> > > Hi Tafuni, >> >> >> >> 2010/5/24 Vito Tafuni <vito at vitotafuni.com>: >> > i''ve found there''s a problem switching to googlev3 >> > in my example i start with a googlev3 map, than i switch to microloft >> map >> > and then back to googlev3 >> > but the last attempt never succedes! >> > if starting with microwoft map after switching to googlev3 the map hangs >> on >> > dragging. >> > >> > i''ve not gone deeper into the problem hoping there''s someone who know >> what''s >> > happening! >> > >> > >> > a minor problem: a weight/height "declaration dropped" on resizeTo for >> > googlev3 >> > changing line 77 of googlev3.core.js solve the warning >> > this.currentElement.style.width = width + "px"; >> > this.currentElement.style.height = height + "px"; >> > >> >> why not just add the "px" outside of the call and pass it "100px" or >> whatever as an input? this way you could also send it "100%" if you >> wanted? >> >> ciao, >> Ed >> >> >> >> > >> > -- >> > ----------- >> > Tafuni Vito >> > vito at vitotafuni.com >> > --------------------------------------------- >> > "Verba volant, scripta manent... data corrupted" >> > >> > _______________________________________________ >> > Mapstraction mailing list >> > Mapstraction at lists.mapstraction.com >> > >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > >> > >> _______________________________________________ >> 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/20100526/c26e2afb/attachment.htm>
Derek Fowler
2010-May-26 22:37 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
You shouldn''t need to do this, one map container DIV should be sufficient. If it isn''t working there may be a problem somewhere. If you post your map creation code or a link to a demo page I''ll have a look. Derek On May 26, 2010 4:08 PM, "Vito Tafuni" <vito at vitotafuni.com> wrote: there''s no problem swapping from microzoft to googlev3 i was making the wrong way! using the same #map div making two internal div solved the problem <div id=map><div id=map_google></div><div id=map_microsoft></div></div> ...i like to think the external div is the map container... -- ----------- Tafuni Vito vito at vitotafuni.com--------------------------------------------- "Verba ... 2010/5/24 Vito Tafuni <vito at vitotafuni.com> > > I think that if the doc says> > void resizeTo(<In..._______________________________________________ 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/20100526/08589b3e/attachment.htm>
Vito Tafuni
2010-May-27 06:42 UTC
[Mapstraction] problem on swapping to googlev3 & weight/height "declaration dropped"
multiple div are used on mapstraction sandbox too infact using a single div container cause the map to not respond correctly to events like dragging (that''s the problem i had at the begin!) and in my example if I register a click event on microsoft map after swapping the google map call that event too!! for me is not a problem to have multiple div but if we could make it happen automatically it could be great! -- ----------- Tafuni Vito vito at vitotafuni.com --------------------------------------------- "Verba volant, scripta manent... data corrupted" 2010/5/27 Derek Fowler <dezfowler at gmail.com>> You shouldn''t need to do this, one map container DIV should be sufficient. > If it isn''t working there may be a problem somewhere. If you post your map > creation code or a link to a demo page I''ll have a look. > > Derek > > On May 26, 2010 4:08 PM, "Vito Tafuni" <vito at vitotafuni.com> wrote: > > there''s no problem swapping from microzoft to googlev3 > i was making the wrong way! using the same #map div > > making two internal div solved the problem > <div id=map><div id=map_google></div><div id=map_microsoft></div></div> > > ...i like to think the external div is the map container... > > > -- ----------- Tafuni Vito vito at vitotafuni.com--------------------------------------------- "Verba ... > > 2010/5/24 Vito Tafuni <vito at vitotafuni.com> > > I think that if the doc > says > > void resizeTo(<In... > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > _______________________________________________ > 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/20100527/4f147efc/attachment.htm>