Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] the scale denomenator in new map

I think there is something called "map interceptors" ... people often
use those to dump a couple base layers into each and every map that is
created for custom apps.

If you wanted to do the same thing to explicitly set the viewport
model (ie including scale) I think you could manage it. Please give it
a go and let us know how it works out.

Jody

On Wed, Jun 10, 2009 at 1:26 AM, Arto Pastinen<arto.pastinen@xxxxxxxxx> wrote:
> Is there a way to set the scaleDenominator before map is rendered, in
> my example code
> the scale denomenator is in event -1.0, and in UI scale label something very big
> because my map is so big.
>
> I like to set it some reasonable value because otherwise it take so
> much time to render
> first image.
>
> CreateMapCommand cmc = new CreateMapCommand("default", tst, activeProject);
> activeProject.sendSync(cmc);
> IMap map = cmc.getCreatedMap();
> map.executeSyncWithoutUndo(new SetScaleCommand(10000));
>
> map.addMapListener(new IMapListener() {
> public void changed(MapEvent event) {
> event.getScaleDenomenator() == -1.0
> }
> });
> ApplicationGIS.openMap(map);
>
> - Artsi
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top