MAAP-Project / stac_ipyleaflet

Apache License 2.0
29 stars 2 forks source link

Refactor Map instance naming system #114

Open emmalu opened 1 year ago

emmalu commented 1 year ago
          This is a very minor comment, but perhaps you should consider renaming the class `StacIpyleaflet` to `StacMap`. This might aid in clarity as to what it is.

Consider that when using iplyleaflet, this is conventional:

from ipyleaflet import Map

m = Map()

or

import ipyleaflet

m = ipyleaflet.Map()

Since StacIpyleaflet is a subclass of Map (ipyleaflet.Map), it might aid clarity by naming StacIpyleaflet to StacMap so that it better corresponds to the iplyleaflet conventions. This would then give you this:

from stac_ipyleaflet import StacMap

m = StacMap()

or

import stac_ipyleaflet

m = stac_ipyleaflet.StacMap()

It seems a bit odd to do the following, not only because of the redundancy, but also because it isn't obvious that StacIpyleaflet is an ipyleaflet.Map:

from stac_ipyleaflet import StacIpyleaflet

Anyway, just my 2 cents.

_Originally posted by @chuckwondo in https://github.com/MAAP-Project/stac_ipyleaflet/issues/113#issuecomment-1721683343_