ramnathv / rMaps

Interactive Maps from R
http://rmaps.github.io
389 stars 194 forks source link

circle2 javascript problem #13

Open HarlanH opened 10 years ago

HarlanH commented 10 years ago

It seems like this code is not quite right:

if (spec.circle2){
      for (var c in spec.circle2){
        var circle = L.circle(c.center, c.radius, c.opts)
         .addTo(map);
      }
    }

I believe that that sort of for loop is not encouraged. When I run it in my browser, I get an error, and c is set to "0", not to the first element of the object. I'm pretty terrible at Javascript, so I'm not sure what the right solution is.

ramnathv commented 10 years ago

@HarlanH The circle2 function was an experimental function, which I haven't touched in a long time. I am doing a full rewrite of the Leaflet mapping so that it confirms more with the javascript API. I hope to have a version by end of March. I will try to post a quick solution to multiple circle markers later this week.

HarlanH commented 10 years ago

OK, thanks. This one isn't super-important to me for now...