Add Geo Base Class
Currently the FileMarker is the only geo map class that the project has.
We want to implement the ability to display arbitrary geojson data and that data will not fit into the FileMarker class.
I suggest we add a base class which the FileMarker and geojson class derive from.
The base class will define the minimum attributes for the rest of the system to work and the subclasses will extend them.
In my previous pull request I called it BaseGeoLayer which defined attributes for:
- The file the data came from
- other metadata from the file
- A leaflet layer object (typed in the subclass)
- An abstract constructor for the leaflet layer object.
The subclasses then define the implementation for the class. These were GeoJSONLayer and FileMarker.
The implementation for this can be seen here in my previous pull request. https://github.com/gentlegiantJGC/obsidian-map-view/blob/11477777418f2dd01b22893af4568e4c4b752b2a/src/markers.ts#L35-L258
Typing would then need to be changed to the base class.
If you are okay I will start working on it. I won't add the GeoJSON in this pull request, just the base class and the modified typing.
Which branch would you like me to work from?
Edit: Changed link
I like the direction. Please base it on the v2.1 branch which includes a substantial set of changes.