Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
seleccione opción múltiple de marcador - folleto dibujar angular 2

Quiero crear una función que pueda seleccionar múltiples opciones de marcador como Mapmarker National Geographic usando un componente de dibujo de folleto. Ya creé una barra de herramientas en la que el usuario puede dibujar polilíneas, polígonos, círculos, rectángulos y poner un marcador de icono predeterminado.

Ya investigué cómo seleccionar múltiples opciones de marcadores, pero no encontré una solución adecuada para mi problema. ¿Alguien puede ayudarme a crear esta función?

Aquí está mi código:

 import {Component, ViewEncapsulation} from '@angular/core'; import {MapService} from "./../../shared/leaflet/map.service"; import {GeocodingService} from "./../../shared/leaflet/geocoding.service"; import 'leaflet-map'; @Component({ encapsulation: ViewEncapsulation.None, selector: 'maps', templateUrl: './app/components/maps/maps.component.html', styleUrls: [ './app/components/maps/maps.components.css' ], providers: [MapService, GeocodingService] }) export class MapsComponent { constructor(private mapService: MapService, private geocoder: GeocodingService) { } ngOnInit(): void { console.log('map component'); } ngAfterViewInit() { let map = L.map("map", { zoomControl: false, center: L.latLng(40.731253, -73.996139), zoom: 12, minZoom: 4, maxZoom: 19, layers: [this.mapService.baseMaps.OpenStreetMap] }); L.control.zoom({ position: "topright" }).addTo(map); L.control.scale().addTo(map); this.mapService.map = map; this.geocoder.getCurrentLocation() .subscribe( location => map.panTo([location.latitude, location.longitude]), err => console.error(err) ); var drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); var drawControl = new L.Control.Draw({ edit: { featureGroup: drawnItems, } }); map.addControl(drawControl); map.on(L.Draw.Event.CREATED, function (e) { var layer = e.layer; drawnItems.addLayer(layer); }); } }
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!