Hi Stéphane, Ecaterina and everyone,
Hope you all had a wonderful weekend.
So I am working on shapes and wanted to know how I should deal with the
large number of options for each shape type. As expected, the options are
different for each shape type.
I have multiple approaches in mind for this:
*Approach A:* Using the normal properties of XClass, create all the options
for a shape type as properties for that class. This will in turn increase
the class size as a lot of options will exist for each shape type.
*Approach B:* Use a static list or array to define the value of each shape
type option. I have tried and it seems we cannot make use of key value
pairs in static list or any other data type in XWiki so I am not completely
sure of the implementation using static lists.
*Approach C:* Create a single TextArea property for options in each shape
type class. The user can pass a JSON of options in that TextArea. Imho I
prefer this approach since JSON is a standard format and it will give the
user freedom of which options to use.
WDYT?
Best,
Fawad Ali
On Mon, Jul 22, 2019 at 10:25 PM Stéphane Laurière <slauriere(a)xwiki.com>
wrote:
Hi Fawad, Hi all,
Hi all,
Hope you are doing well.
Stephane proposed that there should be a change in the Point data
structure. I agree that latitude and longitude should be two distinct
fields but am not sure how we are going to accommodate geographical
addresses. Should we create a separate class for an address? But if we
are
going to supply latitude and longitude to the
map, we will need to
process
the addresses in some way and store their lat and
lng somewhere as a
point
object.
I am going to put this on hold until we are in the clear.
I just commented on this at
https://jira.xwiki.org/browse/INTMAP-27
I have also added support for using custom class
properties as addresses
to
feed to the map as points. This feature is
available in the advanced
options of map configuration. For now, the properties should be given in
the form property.ClassPath.property_name e.g.
property.XWiki.XWikiUsers.address_en. This is inline with how solr
perceives properties.
That sounds great to use the same syntax as the Solr one indeed.
Does anyone have any suggestions for making it
easier to query a class
property? I will try to remove the need for the ending "_en" or
"_string"
part since they can prove confusing in some contexts.
+1 for removing "_en" since the app could be used in wikis where English
is not enabled. I don't have further suggestion on my end so far...
I will start moving on with the development and
create a mechanism for
adding paths to the map.
Great, I commented also at
https://jira.xwiki.org/browse/INTMAP-27 as you
probably noticed,
Cheers
Stéphane
--
Stéphane Laurière
XWiki –
https://xwiki.com