ngx-leaflet

Leaflet marker icon url compiled wrong while running ng build --prod

梦想的初衷 提交于 2021-01-27 07:41:18
问题 For some reason the Leaflet marker icon url compiled wrong while running ng build --prod instead when running ng build the Leaflet marker icon url is fine. My environment: Angular CLI: 7.0.5 Node: 11.2.0 OS: linux x64 Angular: 7.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.10.5 @angular

Leaflet marker icon url compiled wrong while running ng build --prod

南笙酒味 提交于 2021-01-27 07:41:11
问题 For some reason the Leaflet marker icon url compiled wrong while running ng build --prod instead when running ng build the Leaflet marker icon url is fine. My environment: Angular CLI: 7.0.5 Node: 11.2.0 OS: linux x64 Angular: 7.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.10.5 @angular

Leaflet marker icon url compiled wrong while running ng build --prod

佐手、 提交于 2021-01-27 07:40:27
问题 For some reason the Leaflet marker icon url compiled wrong while running ng build --prod instead when running ng build the Leaflet marker icon url is fine. My environment: Angular CLI: 7.0.5 Node: 11.2.0 OS: linux x64 Angular: 7.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.10.5 @angular

Leaflet marker icon url compiled wrong while running ng build --prod

故事扮演 提交于 2021-01-27 07:40:22
问题 For some reason the Leaflet marker icon url compiled wrong while running ng build --prod instead when running ng build the Leaflet marker icon url is fine. My environment: Angular CLI: 7.0.5 Node: 11.2.0 OS: linux x64 Angular: 7.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.10.5 @angular

'L' refer to a UMD global - compilation error

陌路散爱 提交于 2020-05-10 07:28:50
问题 I am using in my project the plugin ngx-leaflet, and angular-cli. I am trying to use leaflet as described in the doc, for example : The problem is when I'm trying to compile I got the following error : Compiled with : ng serve --aot Context here : I did try to import L in different ways using : import { LeafletModule } from '@asymmetrik/ngx-leaflet'; But I cannot find anything in documentation nor the github. I did remove the module atm to compile, but I need a workaround. Here is the package

Using popups with ngx-leaflet

你说的曾经没有我的故事 提交于 2020-01-03 05:33:13
问题 I'd like to make a more involved popup with ngx-leaflet that can make use of Angular directives and generally be treated as any other Angular component. Is there a good way to do this? You can create a popup using L.popup and setContent however this requires a raw html string. 回答1: I've been using ngx-leaflet i.c.w. angular material. You can show a dialog by clicking on a marker like so: marker([geo.latitude, geo.longitude], { icon: icon({ iconSize: [25, 41], iconAnchor: [13, 41], iconUrl:

Bounds is not valid

℡╲_俬逩灬. 提交于 2019-12-24 17:06:11
问题 I'm trying to implement a leaflet map where the zoom level dynamically encapsulates my 3 markers. I have looked for related questions about this and have discovered this is the most popular way: const group = L.featureGroup(this.markerLayers); map.fitBounds(group.getBounds()); However I get the error "bounds is not valid". I'm new to leaflet altogether, any idea what the problem is? HTML: <div class="leaflet-container grow z-0" leaflet [leafletOptions]="options" [leafletZoom]="leafletZoom"

Coordinates on clickevent

本秂侑毒 提交于 2019-12-22 08:56:12
问题 I'm new to @asymmetrik/ngx-leaflet and Angular in general, so this is maybe just a newbie-issue... I have an Angular.io (v5) project using the @asymmetrik/ngx-leaflet-tutorial-ngcli Now I would like to get the coordinates of the point I clicked on the map. According to Issue #51 get coordinates on click?, I added this: map.on('click', () => { console.log(e.latlng); }); to: onMapReady(map: Map) { map.fitBounds(this.route.getBounds(), { padding: point(24, 24), maxZoom: 12, animate: true }); map

How to create a vector tiles map with ngx-leaflet (Angular way)?

人走茶凉 提交于 2019-12-21 05:09:09
问题 Any good recommended angular 6+ supported libraries which can be used to accomplish the following task? I'm using ngx-leaflet as the Map. I wish to create the map with Vectors rather than Rasters . I know that Leaflet doesn’t support vector tiles by default, however, you can accomplish via mapbox-gl-leaflet plugin. Can anyone recommend me an approach or an appropriate library to accomplish this task using angular 6+? 回答1: You may use Leaflet.VectorGrid plugin. See ngx-leaflet-starter and the