[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
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.udig.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+preferred+Map+Scales
and like to contribute...
Cheers, Frank
2012/7/20 Sophie TRY <sophie.try@xxxxxxxxxxxx>:
> 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
>