Mapwize / mapwize-ui-js

Fully featured and ready to use Widget to add Mapwize Indoor Maps and Navigation in your JavaScript app and Website.
https://docs.mapwize.io
MIT License
39 stars 7 forks source link

Incorrect documentation for NPM library #175

Open samueldepooter opened 4 years ago

samueldepooter commented 4 years ago

Hello,

First of all thanks for making this and making it open source! I've needed it for a project and came across some unexpected things. I will split them up into separate issues so it's easier to follow up.


Tech stack:

The documentation states that I can initialize mapwize like so:

MapwizeUI.map(apiKey: String).then(function (instance) {
  mapwizeMap = instance
})

But it seems like the library only exports a function that is the map function

import MapwizeUI from 'mapwize-ui';

MapwizeUI(apiKey)
  .then(instance => {
    mapwizeInstance = instance;
  });

Is this intended? The documentation makes it very confusing.

mathieugerard commented 4 years ago

Hi Samuel. Thanks for the feedback! We'll review and address the issues as soon as possible.

samueldepooter commented 4 years ago

Thank you! If there's anything you need help with, I'll see what I can do in a short notice.

Sparksx commented 4 years ago

Hi @samueldepooter

the lib export a bunch of functions and constants see index.ts As map function is the default one you can use like your example with npm

samueldepooter commented 4 years ago

Hello @Sparksx ,

Yes that's what I found! It would be good for future users of this lib if that was added to the documentation.