-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalise OL Layer's naming inside Hajk #883
Comments
Let's hold this off until we're rewriting the LayerSwitcher-plugin |
- I've added the 'name' property wherever I couldn't see any. - I called the layers 'coreFoo' or 'pluginFoo' so far, depending on if the layer is added in Core or by a Plugin. I'm not sure this is the best way to go, perhaps we could use another prefix or syntax. - Those layers that already had a 'type' property were not modified: I only added (duplicated) the existing value from 'type', while keeping it. Replacing 'type' with 'name' will require more search-and-replace, which I'm not doing right now.
- Currently the marker is hard-coded (never a good solution. - In order to make it a setting we need to differentiate it from the current Infoclick settings. Right now there is no way to set a marker for click event. The marker that exists in Admin is for actually marking the clicked feature (if it is a Point feature). We want to keep this setting too, and it's possible that we want different indicators for those two points (one for the 'clicked here' marker and another one to actually mark a selected feature). - Also, I tried to give some reasonable properties to the vector layer needed for this. Please see #883 for more info.
While implementing #1086 I came into the conclusion that this is very much a pre-requirement for a successful implementation of #1086. Even if we don't fix the naming/caption confusion right away, we should at least add a Without this #1086 gets unnecessarily complicated. |
When we add a
Layer
to theMap
, we currently set some additional properties. Two of them are redundant:name
, andtype
- where name is used mostly (and is, in fact a wrong term, as it's more of anid
).In addition, in some cases we add a
Layer
to theMap
, without supplying neithername
,type
norcaption
.Here's an example for
[l.get("name"), l.get("type"), l.get("caption")]
:In the example above, 29-30 should have a
name
added, 31 should have thetype
value moved toname
(and all references in code must be changed, naturally). Finally, all names should follow the same casing, be it camelCase or kebab-case.The text was updated successfully, but these errors were encountered: