File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ Visit the examples in [hpneo.github.com/gmaps](http://hpneo.github.com/gmaps/)
88Changelog
99---------
1010
11+ 0.3.2
12+ -----------------------
13+ * Support for removing Fusion Tables and GeoRSS/KML layers with removeLayer
14+
11150.3.1
1216-----------------------
1317* Improve event binding at adding markers, polylines or polygons
Original file line number Diff line number Diff line change 88 < script src ="../gmaps.js "> </ script >
99 < link rel ="stylesheet " href ="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css " />
1010 < link rel ="stylesheet " type ="text/css " href ="examples.css " />
11- < script >
12- $ ( function ( ) {
13- var map = new GMaps ( {
11+ < script type ="text/javascript ">
12+ var map ;
13+ $ ( function ( ) {
14+ map = new GMaps ( {
1415 el : "#map" ,
1516 lat : - 12.043333 ,
1617 lng : - 77.028333 ,
Original file line number Diff line number Diff line change 11/*!
2- * GMaps.js v0.3.1
2+ * GMaps.js v0.3.2
33 * http://hpneo.github.com/gmaps/
44 *
55 * Copyright 2012, Gustavo Leon
@@ -1312,10 +1312,20 @@ if(window.google && window.google.maps){
13121312 }
13131313 } ;
13141314
1315- this . removeLayer = function ( layerName ) {
1316- if ( this . singleLayers [ layerName ] !== undefined ) {
1317- this . singleLayers [ layerName ] . setMap ( null ) ;
1318- delete this . singleLayers [ layerName ] ;
1315+ this . removeLayer = function ( layer ) {
1316+ if ( typeof ( layer ) == "string" && this . singleLayers [ layer ] !== undefined ) {
1317+ this . singleLayers [ layer ] . setMap ( null ) ;
1318+ delete this . singleLayers [ layer ] ;
1319+ }
1320+ else {
1321+ for ( var i = 0 ; i < this . layers . length ; i ++ ) {
1322+ if ( this . layers [ i ] === layer ) {
1323+ this . layers [ i ] . setMap ( null ) ;
1324+ this . layers . splice ( i , 1 ) ;
1325+
1326+ break ;
1327+ }
1328+ }
13191329 }
13201330 } ;
13211331
You can’t perform that action at this time.
0 commit comments