NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have installed using npm the plugins for routing and location for leaflet (that are leaflet-routing-machine and leaflet-locatecontrol), then imported in my typescript file this way:

 import { locatecontrol, locationfound, locate} from 'leaflet.locatecontrol'
 import { Routing} from "leaflet-routing-machine"

However, if I do L.control.locate() or L.Routing it tells me that, respectively, locate() cannot be found as a property and Routing does not exist.
Am I missing something to import or things like that?

asked 24 Aug '17, 14:18

PachiEPap's gravatar image

PachiEPap
11334
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×74

question asked: 24 Aug '17, 14:18

question was seen: 1,326 times

last updated: 24 Aug '17, 14:18

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum