angular-leaflet-directive

Leaflet - get a map that covers the full screen

假如想象 提交于 2019-12-11 03:09:37
问题 In leaflet and mapbox I would like to get rid of the two gray bars above and under the map as seen on the picture below. My #map DOM element takes the full screen and the gray bars disappear when I zoom in (e.g., zoomLevel = 3). So the gray bars seem to be caused by the fact that a zoomLevel has a given height (in px) of the tiles which is smaller than my screen. I want to keep the tiles of the same zoom level but make sure the height of the tiles cover at least the full screen. Here is my

Check if a polygon point is inside another in leaflet

拥有回忆 提交于 2019-12-10 02:36:37
问题 I'm having two sets of polygon coordinates selected from leaflet geoJSON map. The parent and child coordinates are coordinates are: var parentCoordinates=[ [ 32.05898221582174, -28.31004731142091 ], [ 32.05898221582174, -28.308044824292978 ], [ 32.06134255975485, -28.308044824292978 ], [ 32.06134255975485, -28.31004731142091 ], [ 32.05898221582174, -28.31004731142091 ] ] var childCoordinates=[ [ 32.059904895722866, -28.30970726909422 ], [ 32.059904895722866, -28.308743809931784 ], [ 32

Showing GeoJSON data on overlay

房东的猫 提交于 2019-12-08 03:29:43
问题 I'm trying to show/hide some GeoJSON data on an overlay layer. I've the data as an object, but not at some server. If I use the overlay type 'geoJSON', I'm getting a Eror: A base layer must have an url How do I show/hide my data using the overlay show/hide? The mixed-layers-overlays-geojson-example is not working for me because it uses remote (xyz-json) data. Additional information: I've the data in some object that I'm intending to modify/update based on user interaction. PS: it's probably

Angular Token Error

半城伤御伤魂 提交于 2019-12-07 21:56:32
问题 I am getting this all of a sudden, and It doesn't let me use my leaflet map properly. Everytime I click on the map, a marker is added to the same coordinates. When I try to remove markers with a function, it empties the markers-array, however the markers are still visible on the map. What's going on? Error: [$parse:syntax] Syntax Error: Token '.0' is an unexpected token at column 8 of the expression [markers.0] starting at [.0]. http://errors.angularjs.org/1.4.8/$parse/syntax?p0=.0&p1=is%20an

change default icon toolbar (Leaflet)

走远了吗. 提交于 2019-12-07 18:11:51
问题 how can i change default toolbar icon to something else on leaflet.. picture above show the default view of icon.. i want to customize and change the icon to something else for example the first icon i want to look like as a bridge and second text icon and so on.. i already tried a few ways but did not work. here my code var electricpole = L.Icon.extend({ options: { shadowUrl: null, iconAnchor: new L.Point(12, 12), iconSize: new L.Point(30,30), iconUrl: 'image/electricpole.png' } }); L

how make ng-model=“search” have influence on leaflet directive?

ぐ巨炮叔叔 提交于 2019-12-03 22:39:10
问题 I use leaflet-angular-directive, i successfully display objects in table and map, although i achieved filtering through searching input only affect geojson objects in table. My aim: make filtering through searching input affect geojson objects in table and map. My Module var AppMapDirectory = angular.module('DirectoryAppMap', ['ngResource', 'leaflet- directive']); My Factory AppMapDirectory.factory("Directory", function($resource) { return $resource("json/result.json", {}, { get: { method:

Ionic / Leaflet - Can't get Tiles 404 Not Found (from cache)

限于喜欢 提交于 2019-12-02 04:15:32
问题 I'm locked with an issue that is very odd. I'm using leaflet with angular-leaflet-directive. On the previous app, everything worked. Now on a new app, I'd like to implement a new leaflet map. I have therefore copied my previous code. My Issue is that, the leaflet map opens, my markers are created, but TILES are not loaded (I do have internet & internet rights for my app) Every tile that tries to be loaded failed and gets the following issue : GET http://a.tile.openstreetmap.org/18/98891

how make ng-model=“search” have influence on leaflet directive?

余生颓废 提交于 2019-12-01 02:01:04
I use leaflet-angular-directive, i successfully display objects in table and map, although i achieved filtering through searching input only affect geojson objects in table. My aim: make filtering through searching input affect geojson objects in table and map. My Module var AppMapDirectory = angular.module('DirectoryAppMap', ['ngResource', 'leaflet- directive']); My Factory AppMapDirectory.factory("Directory", function($resource) { return $resource("json/result.json", {}, { get: { method: "GET", cache: true } }); }); My Controller AppMapDirectory.controller("DirectoryMapList", function($scope

leaflet square given centre and square width

有些话、适合烂在心里 提交于 2019-11-30 10:01:20
问题 On Leaflet I can create a new circle easily given the centre and the radius: // Circle var radius = 500; // [metres] var circleLocation = new L.LatLng(centreLat, centreLon); var circleOptions = { color: 'red', fillColor: '#f03', fillOpacity: 0.5 }; var circle = new L.Circle(circleLocation, radius, circleOptions); map.addLayer(circle); The circle above is created and drawn without problems, so it is all. However, if I wanted now to create and draw a rectangle that which bounds the circle, it