I have fixed the errors you mentioned. It appears one of the variables had a bad name which was causing the error.
On the UI side, possibly as a consequence, I can't see a list of results > anymore, and the search widget state is not restored. The list of results is just fine on my end, I am not sure what could be wrong. About the map state, it does not work well with facets. Since facets have a separate code we cannot apply custom code when a facet is selected thus limiting our ability to pass the map state through js. I tried looking around for related js events but could not find one through which we can pass the map state after a facet is clicked. Do you have anything in mind for this? I think the name "Maps.Code.Leaflet" might be misleading for potential > developers: this could mean this page is providing Leaflet, while it does > not. I would suggest to choose a name that is closer to what the JavaScript > really provides, from a functional point of view, what do you think? I think its fine as is. Since it is placed inside the Code space, the developers will immediately be able to know that all the Leaflet related code resides inside it. But to be on the safe side, we can rename it to LeafletMap as in the macro-map. Ludovic just suggested an improvement (for the next versions): let the user > configure which existing field could be used in an existing class for > retrieving geographical information, that could be interesting indeed, to > be discussed. The calendar application works this way already as far as I > understood: it lets the user define the date / time field to be used. Thanks Ludovic for your suggestion. I would look into the calendar application to have a better understanding of this and let you know my thoughts. Best, Fawad On Wed, Jul 10, 2019 at 2:55 PM Stéphane Laurière <slauri...@xwiki.com> wrote: > Hi Fawad, > > Good to hear from you again, I hope things are fine on your end as well. > Thanks for the update. Sorry for the delay, we were traveling yesterday. > Releasing the application soon sounds good. I'm facing a few issues though, > they may be related to an installation issue on my side, not sure. I > grabbed the latest code and imported as a XAR over the existing pages in my > 11.x wiki without error, and I notice the following (I'll consider posting > some Jira issues if needed): > > - catalina.out errors (not sure if they were present with previous > version): > > 2019-07-10 11:34:30,349 [ > http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1] > WARN c.x.x.w.s.JsExtension - Error at line 203, column 85: > missing variable name. Caused by: [ var index = 0, lat = 0, lng = 0, > coordinates = [], shift = 0, result = 0, byte = null, latitude_change, > longitude_change, factor = Math.pow(10, Number.isInteger(precision) ? > precision : 5);] > 2019-07-10 11:34:30,350 [ > http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1] > WARN c.x.x.w.s.JsExtension - Error at line 206, column 13: > identifier is a reserved word. Caused [...] > 2019-07-10 11:35:02,841 [ > http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1] > ERROR c.x.x.w.s.JsExtension - Runtime error minimizing JSX object: > Compilation produced 8 syntax errors. > 2019-07-10 11:35:02,841 [ > http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1] > WARN c.x.x.w.s.JsExtension - Failed to compress JS extension: null > > - On the UI side, possibly as a consequence, I can't see a list of results > anymore, and the search widget state is not restored. > > - I notice there is no default radio button checked in the search form: I > think either "location" or "item" should be checked, to let the user know > what's the default (I'd say "item"). > > - I think the name "Maps.Code.Leaflet" might be misleading for potential > developers: this could mean this page is providing Leaflet, while it does > not. I would suggest to choose a name that is closer to what the JavaScript > really provides, from a functional point of view, what do you think? > > - Ludovic just suggested an improvement (for the next versions): let the > user configure which existing field could be used in an existing class for > retrieving geographical information, that could be interesting indeed, to > be discussed. The calendar application works this way already as far as I > understood: it lets the user define the date / time field to be used. > > Cheers > > Stéphane > > > Fawad Ali: > > Hi all, > > Hope everyone is well. > > > > Please review the application developed so far. I have included a UI > test and map states. I think we should release the application as soon as > we can so that user reviews can be gathered. > > > > Best, > > Fawad > >