Get the Scale of the map

4 messages Options
Embed this post
Permalink
Shekers

Get the Scale of the map

Reply Threaded More More options
Print post
Permalink
I was wondering if there's a way to get the scale of the map. I know there's GetScale() for the Ajax Viewer, but for the fusion viewer, there doesn't seem to be such function.
Paul Spencer-2

Re: Get the Scale of the map

Reply Threaded More More options
Print post
Permalink
Assuming that your map widget's *name* is Map,

Fusion.getWidgetById('Map').getScale();

Cheers

Paul

On 2009-10-21, at 11:32 PM, Shekers wrote:

>
> I was wondering if there's a way to get the scale of the map. I know  
> there's
> GetScale() for the Ajax Viewer, but for the fusion viewer, there  
> doesn't
> seem to be such function.
> --
> View this message in context: http://n2.nabble.com/Get-the-Scale-of-the-map-tp3870023p3870023.html
> Sent from the Fusion Users mailing list archive at Nabble.com.
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Shekers

Re: Get the Scale of the map

Reply Threaded More More options
Print post
Permalink
Thanks a lot Paul,

I'll try that out. I've actually thought of a way to do it before your reply.

Since Fusion has the Editable Scale on the Status Bar, i just use some javascripts to get the value from the editable scale to get the scale. But your method would be more permanent.

I assume I would put that in the MapGuideViewer.js as a function?

Thanks

Calvin Shek



Paul Spencer-2 wrote:
Assuming that your map widget's *name* is Map,

Fusion.getWidgetById('Map').getScale();

Cheers

Paul

On 2009-10-21, at 11:32 PM, Shekers wrote:

>
> I was wondering if there's a way to get the scale of the map. I know  
> there's
> GetScale() for the Ajax Viewer, but for the fusion viewer, there  
> doesn't
> seem to be such function.
> --
> View this message in context: http://n2.nabble.com/Get-the-Scale-of-the-map-tp3870023p3870023.html
> Sent from the Fusion Users mailing list archive at Nabble.com.
> _______________________________________________
> fusion-users mailing list
> fusion-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
fusion-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: Get the Scale of the map

Reply Threaded More More options
Print post
Permalink
Yes, you could do that or you can just use it in your code whereever  
you need the scale.

Cheers

Paul

On 2009-10-22, at 1:02 PM, Shekers wrote:

>
> Thanks a lot Paul,
>
> I'll try that out. I've actually thought of a way to do it before your
> reply.
>
> Since Fusion has the Editable Scale on the Status Bar, i just use some
> javascripts to get the value from the editable scale to get the  
> scale. But
> your method would be more permanent.
>
> I assume I would put that in the MapGuideViewer.js as a function?
>
> Thanks
>
> Calvin Shek
>
>
>
>
> Paul Spencer-2 wrote:
>>
>> Assuming that your map widget's *name* is Map,
>>
>> Fusion.getWidgetById('Map').getScale();
>>
>> Cheers
>>
>> Paul
>>
>> On 2009-10-21, at 11:32 PM, Shekers wrote:
>>
>>>
>>> I was wondering if there's a way to get the scale of the map. I know
>>> there's
>>> GetScale() for the Ajax Viewer, but for the fusion viewer, there
>>> doesn't
>>> seem to be such function.
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Get-the-Scale-of-the-map-tp3870023p3870023.html
>>> Sent from the Fusion Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> fusion-users mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>> __________________________________________
>>
>>    Paul Spencer
>>    Chief Technology Officer
>>    DM Solutions Group Inc
>>    http://research.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>
> --
> View this message in context: http://n2.nabble.com/Get-the-Scale-of-the-map-tp3870023p3873598.html
> Sent from the Fusion Users mailing list archive at Nabble.com.
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users