Giter VIP home page Giter VIP logo

Comments (10)

ChaudhryAtif avatar ChaudhryAtif commented on July 28, 2024 2

I started looking into it as well. I will keep you guys posted on progress. Using leaflet-sidebar.d.ts as base.

from leaflet-sidebar-v2.

ChaudhryAtif avatar ChaudhryAtif commented on July 28, 2024 2

@cwgrc2 What have you tried? Since leaflet-sidebar.d.ts is inside the project, you shouldn't have to do a lot other than importing it.

Hopefully this helps:

// package.json
npm install -S leaflet leaflet-sidebar-v2
npm install -D @types/leaflet

// html
<div id="sidebar" class="leaflet-sidebar collapsed">
    ...
</div>

// controller
import * as L from 'leaflet';
import 'leaflet-sidebar-v2';

getSidebar() {
    return L.control.sidebar({container: 'sidebar', autopan: true});
}

from leaflet-sidebar-v2.

noerw avatar noerw commented on July 28, 2024 1

I just released v3.0.1

from leaflet-sidebar-v2.

nickpeihl avatar nickpeihl commented on July 28, 2024

Hi @ChaudhryAtif

I am not familiar with TypeScript or Angular. Would you like to submit pull requests for including TypeScript definitions and an Angular example?

from leaflet-sidebar-v2.

ChaudhryAtif avatar ChaudhryAtif commented on July 28, 2024

The parent repo has a typing file, but this fork is ahead of the parent repo, So typing file will need to be modified, but I do not have any experience in writing typings for a JS project. If someone can write the typing file, I can probably add an Angular example.

@noerw Are you familiar with Typescript?

from leaflet-sidebar-v2.

noerw avatar noerw commented on July 28, 2024

Yeah, a little bit. I can look into it.
Can't help out with angular 2 though

from leaflet-sidebar-v2.

noerw avatar noerw commented on July 28, 2024

fixed in 9873c90

from leaflet-sidebar-v2.

ChaudhryAtif avatar ChaudhryAtif commented on July 28, 2024

@nickpeihl @noerw Will the version get a bump? B/c npm install 3.0.0 doesn't seem to give the latest changes.

from leaflet-sidebar-v2.

cwgrc2 avatar cwgrc2 commented on July 28, 2024

Can anyone here please give an example on actually how to use this in Typescript Angular? A little late to the game here sorry. I have been trying to integrate leaflet-sidebar-v2 for two days now with no luck. I tried '@runette/ngx-leaflet-sidebar' Angular wrapper but that requires a certain version of Angular to work.

Thanks!

from leaflet-sidebar-v2.

cwgrc2 avatar cwgrc2 commented on July 28, 2024

from leaflet-sidebar-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.