Permalink
Browse files

Support feature.draw flag along with geo.draw

  • Loading branch information...
1 parent b30cf99 commit a11bc80564614a504f0748f322ae91ceff436ed5 @geary committed May 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 code/polygonzo.js
View
@@ -268,7 +268,6 @@ PolyGonzo = {
function eachPoly( geos, zoom, offset, callback ) {
var totalFeatures = 0, totalPolys = 0, totalPoints = 0;
for( var geo, iGeo = -1; geo = geos[++iGeo]; ) {
- var thecallback = ( geo.draw === false ? function() {} : callback );
var features = geo.features;
var mercator = PolyGonzo.Mercator.isMercator( geo );
if( mercator ) {
@@ -286,6 +285,10 @@ PolyGonzo = {
var markHtml = [];
for( var iFeature = -1, feature; feature = features[++iFeature]; ) {
+ var thecallback =
+ geo.draw === false || feature.draw === false ?
+ function() {} :
+ callback;
var geometry = feature.geometry, type = geometry.type;
var polys =
type == 'Polygon' ? [ geometry.coordinates ] :

0 comments on commit a11bc80

Please sign in to comment.