DamonOehlman/mapcontrols — Issue #1: Leaflet scale control initially unset
Author: JasonSanford
Created: 2011-10-27 05:00:51+00:00
State: open

Since we're listening to the viewreset event to change our scale control, we don't trigger that until we pan or zoom.

For the demo it might also be good to create a map ```load``` listener to initially set the scale. Unfortunately, to do this you have to create an un-centered/un-zoomed map, create a load listener, then center/zoom the map. So something like:

map = new L.Map('map', {
zoomControl: false,
layers: [cloudmade]
});

map.on("load", updateScale);

map.setView(center, zoom);

// Scale control should be set initially now

I'll see what I can come up with.