Comments (5)
There's a whole host of map options that aren't supported yet by this directive. It would probably be a good thing to add the ability to set general map options on the directive within the scope.
A possible way to conform to how the directive is already setup would be
<leaflet options="options"></leaflet>
Then in the controller
$scope.options = {
scrollWheelZoom: false,
zoomControl: false,
<etc>
};
Within the directive it would be good to pass on as much of this generically as possible to Leaflet. Would help prevent this directive from becoming too big of a middle man. The directive shouldn't be hand mapping each option into the Leaflet map as when there are updates to Leaflet, this directive requires an update.
I'm sure I'll be wanting some of these options in the coming weeks as well so if no one has tackled it by then, I can give it a shot.
from angular-leaflet-directive.
That @grantlucas is a wonderful solution! I hope someone is able to implement it...I don't understand angular directives too well to be able to do it myself, though. :(
from angular-leaflet-directive.
Hi, I have implemented the scrollWheelZoom property inside the actual directive. You can use a similar solution like the proposed by @grantlucas, but we use the "defaults" property to group all these initial options.
You could use the directive passing it the "default" property:
<leaflet defaults="defaults"></leaflet>
Previously, you have to extend the scope on the controller like this:
$scope.defaults = {
scrollWheelZoom: false
}
You can see a demo of this here:
http://tombatossals.github.io/angular-leaflet-directive/examples/custom-parameters-example.html
from angular-leaflet-directive.
@tombatossals you are the MAN!! :D Thank you very very much!!!
from angular-leaflet-directive.
@tombatossals this commit seems to have created errors in my code, though: see #89
I don't know if these can be caused by the update or not, and they seem to have no effect...
from angular-leaflet-directive.
Related Issues (20)
- Is there any support for offline map ? HOT 2
- Tiles error on load in Electron HOT 1
- $scope.path not working when click
- Having issue with tiles which are not being displayed when I want to print my leaflet map
- Central leaflet marker always when map moves
- Cannot read property 'innerText' of undefined at updatePopup
- zoomDelta and zoomSnap are not supported
- Map Not getting refreshed after changing dynamic map profile
- what are you think about convert this repo to new angular (5)?
- How to add simple custom-control to map
- how to override angular-leaflet-directive popup close button
- "The page can't load Google maps correctly"
- the version for angular JS is limited ?? or I can do all ?? as if i were use leftlet.js ????
- Any known issues related to WorldCopyJump w/ Leaflet 1.3.4? HOT 1
- How to draw markers snap to road on map ?
- Unable to load ExtraMarker Plugin HOT 1
- Helpful tip on compiling popup templates
- I can not use some characters in markers
- markers with special characters like dot HOT 1
- Is it possible to GEOJSON open popup by GET param in the url?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-leaflet-directive.