Configure Map Builder to support relative path for the points image source property

Article ID: 2349
Last updated: 29 May, 2018
Article ID: 2349
Last updated: 29 May, 2018
Revision: 3
Views: 662
Posted: 31 Dec, 2008
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to force Map Builder to support relative path for the points image source property?

Answer

In its default version, the Map Builder will save an absolute path for the

image source property in ivl files.To override this, the default editor for the

image source property must be replaced with custom file editor or a simple

string editor.

Add the following static block in the Map Builder to replace the default editor

with the undocumented ilog.views.util.beans.editor.IlvStringEditor:

static {

try {

IlvMapStyleBeanInfo.setAdvancedMode(true);

BeanInfo info = Introspector.getBeanInfo( IlvPointStyle.class );

for (PropertyDescriptor pd : info.getPropertyDescriptors() ) {

if( pd.getName().equals("imageSource") ){

pd.setPropertyEditorClass(IlvStringEditor.class);

}

}

IlvMapStyleBeanInfo.setAdvancedMode(false);

} catch (IntrospectionException e) {

e.printStackTrace();

}

}

Note: Starting in JViews Maps 8.7, IlvStringEditor has been deprecated and should be replaced with ilog.views.util.beans.editor.IlvStringEditorWithNull.NoNull class.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2349
Last updated: 29 May, 2018
Revision: 3
Views: 662
Posted: 31 Dec, 2008 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category