Hi Sophie, that looks strange. Can you debug into the Viewport Implementation (net.refractions.udig.project.internal.render.impl.ViewportModelImpl) and check if it enters: if (eNotificationRequired()) ?
It should notify the change there and I wonder if it is not doing so. Cheers, Andrea On Fri, Aug 10, 2012 at 10:57 AM, Sophie TRY <[email protected]> wrote: > Hi, > > Thank you for your response and sorry for the delay... > > I tried your method, Franck : > - use the extension point net.refractions.udig.project.mapInterceptor; > - use the mapOpening option to set the preferred scales. > > Please see the attached screenshot for source. I've run the application but > no scales changes, then I've debugged and found the "test" SortedSet<Double> > has the original scales. > > Maybe there is something I didn't understand... > Thanks in advance for your help ! > > Sophie > > > -----Message d'origine----- > De : [email protected] > [mailto:[email protected]] De la part de Frank > Gasdorf > Envoyé : vendredi 20 juillet 2012 21:14 > À : User-friendly Desktop Internet GIS > Objet : Re: [udig-devel] Ask for help - Customize scales > > Quite interesting, I had similar issues in the past with the preferred > Scales. I assume that you like to change the preferred scales dynamically > only once for a specific map. > > What I've done to solve this in my particular use case was to use the > extension point net.refractions.udig.project.mapInterceptor > (https://github.com/uDig/udig-platform/blob/master/plugins/net.refractions.u > dig.project/schema/mapInterceptor.exsd) > > and use the mapOpening option to set the prefered scales before the map > opens. > > Properly you are interested in the RFC to add UI support to edit scales : > http://udig.refractions.net:8080/confluence/display/UDIG/UI+Support+for+pref > erred+Map+Scales > and like to contribute... > > Cheers, Frank > > 2012/7/20 Sophie TRY <[email protected]>: >> Hello everybody, >> >> >> >> I’m trying to customize scales in the status line in my uDig >> interface, at launcher interface. I’ve find this peace of code on >> Internet and integrated it in my code : >> >> >> >> private Map _mainmap; >> >> _mainmap = (Map) ApplicationGIS.getActiveMap(); >> >> SortedSet<Double> scales = new TreeSet<Double>(); >> >> scales.add(5000.0); >> >> scales.add(10000.0); >> >> scales.add(25000.0); >> >> scales.add(50000.0); >> >> scales.add(100000.0); >> >> scales.add(200000.0); >> >> scales.add(500000.0); >> >> scales.add(1000000.0); >> >> scales.add(2000000.0); >> >> scales.add(5000000.0); >> >> viewportModelInternal.setPreferredScaleDenominators(scales); >> >> //viewportModelInternal.setScale(20000000.0); >> >> >> >> But nothing happens... However the line in comment >> (viewportModelInternal.setScale(20000000.0); ) does effect. >> >> After looking day in day out for other tracks, I’m now at an impasse. >> Could someone help me please ? >> >> Thanks in advance ! >> >> >> >> Sophie >> >> >> >> >> _______________________________________________ >> User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net >> http://lists.refractions.net/mailman/listinfo/udig-devel >> > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > _______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
