Custom layers in PgAdmin IV Mapview

From: Atle Frenvik Sveen <atle(at)frenviksveen(dot)net>
To: pgadmin-hackers(at)lists(dot)postgresql(dot)org
Subject: Custom layers in PgAdmin IV Mapview
Date: 2018-09-13 13:50:33
Message-ID: 1536846633.3097023.1506889712.370FB966@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi list!

The new Mapview is great, but when you give people something they always want more, and so do I.

I want to be able to add custom background layers to the existing list of layers.

I'm thinking that the list of layers should be configurable from the Preferences -> Sql editor menu (or somewhere in the Preferences)

Then again, given that I know both Js, Leaflet, Backbone, and Python/Flask I guess I should contribute the changes myself rather then waiting for someone else to do this.

However, I have some questions before I jump right on this task:

First some organizational:
1. If I add this, is this something that is welcomed by the project?
2. How do I register a task on https://redmine.postgresql.org/projects/pgadmin4/issues
3. Is it ok to clone the GitHub mirror and submit a PR there?

Then some tech-related questions:

1. It seems like window.top.pgAdmin.Browser.get_preferences_for_module is used for getting preferences from js, and that the PreferencesModule python class is responsible for managing preferences. But where are the default preferences listed?
2. Does the preferences code currently handle editing a list of elements? I'm thinking that the preferences pane for map layers should be something like this.

name | url |
----------|-----------------------------------------------------------------| ------
streets | https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png | [remove]
[] | [] | [add]

2.1 If it does, where in the code can I find it?
2.2 It it doesn't, where in the code can I add it and
3. In either case of 2: how do I specify how a preference object for a module look like?

Thanks in advance for your answers!

-a

--
Atle Frenvik Sveen
atle(at)frenviksveen(dot)net
45278689
atlefren.net

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2018-09-13 14:40:44 Re: Custom layers in PgAdmin IV Mapview
Previous Message Akshay Joshi 2018-09-13 13:06:25 [pgAdmin4][Patch]: Added basic start up logs for RunTime