angular-leaflet-directive

Change color of leaflet map

眉间皱痕 提交于 2021-02-11 15:49:05
问题 I want to change color of the map in leafletjs but I just can't figure out which class it is. I found .leaflet-container { background-color:rgba(255,0,0,0.0); } however it only changes the color outside the map (you see it when map is zoomed out completely) but which classes are responsible for countries color and water? 回答1: Yes, you can change the color of map tiles. With Mapbox Studio you can design interactive maps. Also you can set any/single/multiple language for all the countries.

Change color of leaflet map

痞子三分冷 提交于 2021-02-11 15:48:25
问题 I want to change color of the map in leafletjs but I just can't figure out which class it is. I found .leaflet-container { background-color:rgba(255,0,0,0.0); } however it only changes the color outside the map (you see it when map is zoomed out completely) but which classes are responsible for countries color and water? 回答1: Yes, you can change the color of map tiles. With Mapbox Studio you can design interactive maps. Also you can set any/single/multiple language for all the countries.

Angular-Leaflet-Directive - Issue where the map is technically rendering, but none of its tiles appear .

纵饮孤独 提交于 2019-12-25 03:08:10
问题 . . . because the tiles are absolutely positioned within parent containers whose heights are equal to zero. Here is the directive: https://github.com/tombatossals/angular-leaflet-directive I'm uncertain as to the appropriate channel by which to seek assistance since I'm dealing with a relatively small library. I'm pretty sure I'm not doing anything wrong, since the gray "canvas" with zoom controls for the map is rendering and the map's tiles are being loaded (but without actually being

How to filter angular model (array) without destroying it

穿精又带淫゛_ 提交于 2019-12-23 10:49:14
问题 I have a model for my view. That model is array of objects: var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items And today I am filtering it in the following way: arr = $filter('filter')(arr, filterTerm); // contains 4 items And after this line I get nice filtered data but if I run this filter again I don't have 500 items in it but 4. So to avoid this I store original array in temporary object and when user change filter I first update arr with backup data (it

How to filter angular model (array) without destroying it

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 10:49:08
问题 I have a model for my view. That model is array of objects: var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items And today I am filtering it in the following way: arr = $filter('filter')(arr, filterTerm); // contains 4 items And after this line I get nice filtered data but if I run this filter again I don't have 500 items in it but 4. So to avoid this I store original array in temporary object and when user change filter I first update arr with backup data (it

angular-leaflet-directive custom message html with angular directives in marker popup. How to?

♀尐吖头ヾ 提交于 2019-12-23 09:36:51
问题 I want to insert my custom html markup with $scope event handlers to message property of leaflet marker. For example: App.controller('testController', ['$scope', "leafletEvents", '$compile', 'leafletMarkersHelpers', function($scope, leafletEvents, $compile, leafletMarkersHelpers){ angular.extend($scope, { currentLocation : { lat: 20, lng: 20, zoom: 20 }, markers: { }, defaults: { scrollWheelZoom: true }, events: { map: { enable: ['zoomstart', 'drag', 'click', 'mousemove', 'popupopen'], logic:

Dynamically changing Leaflet map bounds in Angular?

こ雲淡風輕ζ 提交于 2019-12-21 05:45:06
问题 I'm using Angular-leaflet-directive. I have a menu where the user taps an option. Each time the user clicks an option the map is updated with two new markers and the bounds should be adjusted so these markers are both visible. The markers get updated but the bounds seem to work differently. The first time the user clicks something the bounds are updated, but they don't update for each time after that. This is the code which is called each time the user selects an option: var updateMap =

LeafletJS check for not loading map

余生长醉 提交于 2019-12-14 04:01:44
问题 How can I detect whether a map is loading properly or not? What happened was that in my ionic app the map url stopped to work, and the map did not throw an error. It only displayed gray. Is there a way to check for this event properly and fall back to an alternative map? 回答1: A usual but simplistic workaround is to specify a single fallback tile, using the errorTileUrl option of your tileLayer. Typically it shows a light red cross to let the user know the map server does not have any image to

Angular Leaflet Search control event

杀马特。学长 韩版系。学妹 提交于 2019-12-13 18:55:00
问题 I have an AngularJS application and I'm currently trying to access the "search_expanded" event of Leaflet Search control but having no luck. Here's my code: angular.module('myApp', [ 'leaflet-directive' ]) .controller('ShowMapCtrl', ["$scope", "leafletData", function ($scope, leafletData) { // some code leafletData.getMap().then(function(map) { map.on('search_expanded', function(e){ alert("search control expannded"); }); }); 回答1: The search_expanded event, and all the other events supported

leaflet map inside jqWidget resulting in grey tiles

半腔热情 提交于 2019-12-11 12:55:58
问题 I am using angularjs with jqwidgets as a UI Framework and leaflet with angular-leaflet-directive. When I try to put a leaflet map into a jqDockingLayout / jqRibbon, the maptiles of leaflet are not shown properly (grey background instead of tile). Here is a minimal Plunker i prepared: https://plnkr.co/edit/NrvXojEmKqA7PuIhDHTM I tried to call map.invalidateSize(); after document ready and/or after creation of the jqxDockingLayout. I also tried to wrap leaflet in my own directive manually