Closed yehudarav closed 2 years ago
Instead basemaps url in TileLayer- add an option to get map from server. (for work offline )
@YehuditGrinwald would add a UI for the combo box of the tileserver on the trial.
The selection would include the tileserver (openstreetmap
/cartojs
/etc) or an image.
In case of an image, bounds should also be given (lower-right and top-left corners, as 4 numbers)
The DevicePlanner
component would accept a property in the form of a struct
TileLayer={{url, attribution, bounds}}
would add a UI for the combo box of the tileserver on the trial.
@yehudarav should be on trial editor?
@erasta Please send me screenshot of new UI that you described appear ,where it should be locate ?
@YehuditGrinwald This is the current UI which is hard coded. @yehudarav wants it to be on the trial or trialset level, not the map level. That means, outside of this page. Or did i not understand your question?
Itnshould be a configurstion at the server level. The user doesnt need access to it.
On Mon, 13 Jul 2020, 1:21 pm Eran Geva, notifications@github.com wrote:
@YehuditGrinwald https://github.com/YehuditGrinwald This is the current UI which is hard coded. @yehudarav https://github.com/yehudarav wants it to be on the trial or trialset level, not the map level. That means, outside of this page. Or did i not understand your question? [image: image] https://user-images.githubusercontent.com/7118772/87293602-3a33b200-c50b-11ea-8de4-8bea09913fa4.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/argosp/trialdash/issues/76#issuecomment-657472267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCON2LULSPTTTXVFPXGBLTR3LNZNANCNFSM4OEDNCKQ .
Itnshould be a configurstion at the server level. The user doesnt need access to it.
@yehudarav now it is hardcoded on the react code at the server. if that is not sufficient, where do you want it to be changeable?
Itnshould be a configurstion at the server level. The user doesnt need access to it.
@yehudarav now it is hardcoded on the react code at the server. if that is not sufficient, where do you want it to be changeable?
@yehudarav @shimlinnovate where do you want it to be changeable? and who will have access to change these trial map settings? To completely understand the requirement please add more info as a screen ui, user behavior and the desired result you expect to get.
Hi, it should be in a configuration file at the service level. I don't think we need UI for this. (except for documentation). that is, it cannot be changed after the service is up.
@yehudarav what the configuration file contains? list of urls? can I have example ? I need it for the behavior of the leaflet component.
After discussion with @yehudarav and @erasta The requirement is to make map config file (json/ yml) and allows to edit it before server upload. The file content (urls and other param) will be forward to the leaflet component. @erasta please describe here what variable you expect to receive in leaflet component. string of url or more?
created new task related to edit experiment.
@erasta @yehudarav I added new file named .env
, .env.production
(exist already).
.env
- for developers
.env.production
- for production
these will render when server start. files contain variables, each variable has key and value.
When you would like to edit the file and add new variables (to set map IP etc ..) it should be in that syntax:
uppercase, start with REACT_APP
and continue with _
between each word.
for example:
REACT_APP_MAP_ATTRIBUTION= https://carto.com
@erasta in react side you can access the variables that way: process.env.REACT_APP_MAP_URL
in your component. for example:
replace this line with:
attribution={© <a href="${process.env.REACT_APP_MAP_ATTRIBUTION}">Carto</a> contributors
}
Integrated into map https://github.com/argosp/trialdash/commit/c3e246cdb666989e0f74885f84389f8d46abf4e4 Bug can be closed if ok.
@erasta please see my comment about .env
file
switching the conversation here:
@YehuditGrinwald As you see on your example, that would contain the name of the of the tile provider hardcoded. In the case where we switch to another provider that would also change. Since this rarely change, please leave it containing html, as our users are accustomed to a little html. In the case where you definitely don't html there, i'll organize a table inside the DeviceMap
It is necessary to configure the tile server url for the leaflet configuration.
The configuration should be set before loading (a configuration file) of the system, it will not change during the operation.
The leaflet can have several sources, so we need a place in the configuration file to define the list of urls and an graphQL query that will return the list of url's.