Skip to content

Conversation

@pomahtuk
Copy link
Contributor

@pomahtuk pomahtuk commented Feb 5, 2014

Example call

$scope.leaflet = 
  center:
    lat: 59.95
    lng: 30.3
    zoom: 10
  layers:
    options:
      collapsed: false
    baselayers:
      osm:
        name: 'OpenStreetMap'
        url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
        type: 'xyz'

Example call

    $scope.leaflet = 
      center:
        lat: 59.95
        lng: 30.3
        zoom: 10
      layers:
        options:
          collapsed: false
        baselayers:
          osm:
            name: 'OpenStreetMap'
            url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
            type: 'xyz'
tombatossals added a commit that referenced this pull request Feb 9, 2014
Add layers control options support
@tombatossals tombatossals merged commit 1addb7e into tombatossals:master Feb 9, 2014
@tombatossals
Copy link
Owner

Thanks, merged.

I was thinking about making the controls independent of the layers, and manage them from a directive property. Like this:

<leaflet layers="layers" controls="controls"></leaflet>

So we can have the option of show/hide the controls that we want from this object:

$scope.controls = {
    layers: {
        active: true,
        collapsed: false,
    },
    locate: {
        active: true
    }
}

But that will be in the future, your commit makes sense in the actual code.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants