0

I´m surfing inside this tool but I have problems to reload a existing layer with new data.

I have the layer Owner and I have added filters just in the bottom of the layers selector. This filter send an ajax request that returns a JSON and I need to put this data inside this existing layer.

Is it possible to do that only with Leaflet library or I have to use customs gvNIX javascript functions declared in leaflet.ext.gvnix.map.js?

I can't find how to do that with js

Thanks

allen_ajd3
  • 35
  • 8

1 Answers1

0

The classes declared on leaflet.ext.gvnix.map.js are defined to integrate gvNIX generated .tagx on .jspx pages with leaflet component.

Of course, you can modify .jspx to include whatever you need on page or customize any gvNIX component (or duplicate it to extend its functionalities) to fit your requirements.

By example, you can create your own field.tagx to adjust its legend representation.

A good practice to archive it is create a new directory on WEB-INF/tags folder where create your custom tags. Then, in the .jspx, include a new xmlns prefix pointing to your tag folder. This way, you can update gvNIX tags library (from new gvNIX versions) without lose yours customizations.

Good luck!

jmvivo
  • 2,653
  • 1
  • 16
  • 20
  • Yes, I´ve seen that and I´m trying to edit toc.tagx to add my own code. The problem it´s understand all JS logic under this tags. How can I get the data represented inside of a layer? Is there any function to do that ?. Thanks @jmvivo – allen_ajd3 Feb 05 '15 at 14:28
  • Well, I know current `leaflet.ext.gvnix.map.js` is a little bit cryptic. Future versions will be clearer. We are planing to make easy extend and create new layer types (including groups, wms-t, one-geometry layer, etc...), but I can't tell you when it will be. Sorry. – jmvivo Feb 05 '15 at 14:39
  • I agree, it´s not clear trace this JS. Anyway, it´s a great job all new tags that used in jspx files. Maybe in the next versions could it be a good functionality create generic functions like put data in an existing layer or add new layer. Thanks ! – allen_ajd3 Feb 06 '15 at 07:36