question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'Geocoder' does not exist on type 'typeof Control'.ts

See original GitHub issue

Hi,

Im getting error message Property 'Geocoder' does not exist on type 'typeof Control'.ts(2339) Property 'geocoder' does not exist on type 'typeof Control'.

I have installed trough with npm i leaflet-control-geocoder This the code where im getting the errors:

geocoder = L.Control.Geocoder.nominatim() and

 L.Control.geocoder({
            geocoder: this.geocoder
          }).addTo(this.map);

Please help

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
simon04commented, Oct 8, 2022

This should work:

import {Geocoder, geocoders} from 'leaflet-control-geocoder';
new Geocoder({
  geocoder: new geocoders.Nominatim(),
  position: 'topleft',
}).addTo(map);
2reactions
bhagattamucommented, Jun 8, 2021

Has this issue been resolved? I saw that the typescript branch has now been pushed/closed but I’m still running into this error. Any updates/workarounds available?

import * as L from 'leaflet';
import Geocoder from 'leaflet-control-geocoder';

...
const GeocoderControl = new Geocoder();
GeocoderControl.addTo(this.map);
GeocoderControl.on('markgeocode', function (e) {
console.log(e)
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Import leaftlet-control-geocoder in Angular 8 Project?
I added the geocoder inside L.Routing.control, and it works! ... Code still says Property 'Geocoder' does not exist on type 'typeof Control' ...
Read more >
GeocoderControl | leaflet-control-geocoder
Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will...
Read more >
@types/esri-leaflet-geocoder - npm
Start using @types/esri-leaflet-geocoder in your project by running `npm i @types/esri-leaflet-geocoder`. There is 1 other project in the ...
Read more >
TypeScript and Google Maps | Maps JavaScript API
Object literal may only specify known properties, and 'mapId' does not exist in type 'MapOptions'. The above error can be corrected with the...
Read more >
property does not exist on type 'typeof import dynamic import
This happens because when you start the application, The server is actually serving the bundles(JavaScript/CSS/HTML... output files) stored in the dist folder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found