angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
314 stars 134 forks source link

Pass geoJson object instead of url in overlays #164

Open nmccready opened 9 years ago

nmccready commented 9 years ago

From @clluiz on May 11, 2015 22:23

It's possible to pass a geoJson object directly to an overlay definition? Example, make this:

               overlays: {
                    traffic: {
                        name: "Traffic Jams",
                        type: "geoJson",
                        geoJson: {
                                 // geojson definition
                         }
                    }
                }

Instead of this:

               overlays: {
                    traffic: {
                        name: "Traffic Jams",
                        type: "xyz",
                        url: "http://map.be-mobile.be/customer/mobileninja/nl/los/{z}/{x}/{y}.png"
                    }
                }

Copied from original issue: tombatossals/angular-leaflet-directive#751

nmccready commented 9 years ago

It doesnt look like it. If you want it, please add it. It would go in this file.

https://github.com/tombatossals/angular-leaflet-directive/blob/master/src/services/leafletLayerHelpers.js#L45-L53