codesite-noreply at google.com
2010-Jun-03 19:40 UTC
[Mapstraction] [mapstraction] r86 committed - Added polygon/polyline support and fixed click event in Google Maps V3
Revision: 86
Author: duvander
Date: Thu Jun 3 12:39:28 2010
Log: Added polygon/polyline support and fixed click event in Google Maps V3
http://code.google.com/p/mapstraction/source/detail?r=86
Modified:
/trunk/source/mxn.googlev3.core.js
======================================--- /trunk/source/mxn.googlev3.core.js Fri
May 21 11:49:50 2010
+++ /trunk/source/mxn.googlev3.core.js Thu Jun 3 12:39:28 2010
@@ -40,7 +40,9 @@
// deal with click
google.maps.event.addListener(map, ''click'',
function(location){
-
me.clickHandler(location.latLng.lat(),location.latLng.lng(),location,me);
+ me.click.fire({''location'':
+ new mxn.LatLonPoint(location.latLng.lat(),location.latLng.lng())
+ });
});
// deal with zoom change
@@ -162,12 +164,14 @@
addPolyline: function(polyline, old) {
var map = this.maps[this.api];
- return polyline.toProprietary(this.api);
+ var gpoly = polyline.toProprietary(this.api);
+ gpoly.setMap(map);
+ return gpoly;
},
removePolyline: function(polyline) {
- var map = this.maps[this.api];
- // TODO: Add provider code
+ var map = this.maps[this.api];
+ polyline.proprietary_polyline.setMap(null);
},
getCenter: function() {
@@ -450,9 +454,30 @@
},
Polyline: {
-
toProprietary: function() {
- throw ''Not implemented'';
+ var pts = this.points;
+ var gpts = [];
+ for (var i=0; i<pts.length; i++) {
+ gpts.push(pts[i].toProprietary(this.api));
+ }
+ if (this.closed || pts[0].equals(pts[pts.length - 1])) {
+ return new google.maps.Polygon({
+ path: gpts,
+ strokeColor: this.color,
+ strokeOpacity: this.opacity,
+ strokeWeight: this.width,
+ fillColor: this.fillColor || "#5462E3",
+ fillOpacity: this.opacity || "0.3"
+ });
+ }
+ else {
+ return new google.maps.Polyline({
+ path: gpts,
+ strokeColor: this.color,
+ strokeOpacity: this.opacity,
+ strokeWeight: this.width
+ });
+ }
},
show: function() {
Lev Tsypin
2010-Jun-03 20:44 UTC
[Mapstraction] [mapstraction] r86 committed - Added polygon/polyline support and fixed click event in Google Maps V3
Great commit, thanks Adam. I thought we were switching to the Git repo? On Jun 3, 2010, at 12:40 PM, codesite-noreply at google.com wrote:> Revision: 86 > Author: duvander > Date: Thu Jun 3 12:39:28 2010 > Log: Added polygon/polyline support and fixed click event in Google Maps V3 > http://code.google.com/p/mapstraction/source/detail?r=86 > > Modified: > /trunk/source/mxn.googlev3.core.jsLev Tsypin _____________________ Level Online Strategy, LLC 503.342.8044 levelos.com | twitter.com/levelos
Adam DuVander
2010-Jun-03 22:36 UTC
[Mapstraction] [mapstraction] r86 committed - Added polygon/polyline support and fixed click event in Google Maps V3
Oops! It''s hard to break old habits. Two questions: 1) Is the Git repo ready to go? 2) Can someone post steps to follow to commit new code? --Adam On Thu, Jun 3, 2010 at 1:44 PM, Lev Tsypin <lev at levelos.com> wrote:> Great commit, thanks Adam. I thought we were switching to the Git repo? > > On Jun 3, 2010, at 12:40 PM, codesite-noreply at google.com wrote: > > > Revision: 86 > > Author: duvander > > Date: Thu Jun 3 12:39:28 2010 > > Log: Added polygon/polyline support and fixed click event in Google Maps > V3 > > http://code.google.com/p/mapstraction/source/detail?r=86 > > > > Modified: > > /trunk/source/mxn.googlev3.core.js > > Lev Tsypin > _____________________ > Level Online Strategy, LLC > 503.342.8044 > levelos.com | twitter.com/levelos > > _______________________________________________ > 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/20100603/04a48601/attachment.htm>
Vito Tafuni
2010-Jun-03 22:52 UTC
[Mapstraction] [mapstraction] r86 committed - Added polygon/polyline support and fixed click event in Google Maps V3
i''m no more working on mapstraction because i''m looking for other capabilities however i can provide you the few steps needed to commit on git git works in a very powerfull way... you have a local repo you can commit every time you want and changes are sent remotely only in a second time with a push request these are the more important steps to know 1. make a fork of the project on github 2. git clone git-repos-address folder 3. cd folder 4. make your changes 5. git status - give info about changes made on files 6. git add . or git add filename1 filename2 ... - only if you have added new files 7. git commit or git commit filename - the latter version of the command let you comment the changes on a single file 8. git push - send changes to the repo you''ve forked 9. ask for a pull on github i hope i can help you and your project -Vito- -- ----------- Tafuni Vito vito at vitotafuni.com --------------------------------------------- "Verba volant, scripta manent... data corrupted" 2010/6/4 Adam DuVander <mapstraction at duvander.com>> Oops! It''s hard to break old habits. Two questions: > 1) Is the Git repo ready to go? > 2) Can someone post steps to follow to commit new code? > > --Adam > > > > On Thu, Jun 3, 2010 at 1:44 PM, Lev Tsypin <lev at levelos.com> wrote: > >> Great commit, thanks Adam. I thought we were switching to the Git repo? >> >> On Jun 3, 2010, at 12:40 PM, codesite-noreply at google.com wrote: >> >> > Revision: 86 >> > Author: duvander >> > Date: Thu Jun 3 12:39:28 2010 >> > Log: Added polygon/polyline support and fixed click event in Google Maps >> V3 >> > http://code.google.com/p/mapstraction/source/detail?r=86 >> > >> > Modified: >> > /trunk/source/mxn.googlev3.core.js >> >> Lev Tsypin >> _____________________ >> Level Online Strategy, LLC >> 503.342.8044 >> levelos.com | twitter.com/levelos >> >> _______________________________________________ >> 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/20100604/51a28846/attachment.htm>