MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
There is a property CurrentScale, but no other guidance on how to display a scale.
How do I add a scale to the map?
Posted by:
bendel_boy ()
Date: June 18, 2012 04:56AM
There is a property CurrentScale, but no other guidance on how to display a scale.
Re: How do I add a scale to the map?
Posted by:
pmeems ()
Date: June 18, 2012 08:06AM
Did you look at the documentation:
[www.mapwindow.org]
Can you make clear what you want to do?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
[www.mapwindow.org]
Can you make clear what you want to do?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: How do I add a scale to the map?
Posted by:
bendel_boy ()
Date: June 18, 2012 08:36AM
I am using the OCX version, which does not appear to have any AxMap properties or methods.
What I would like is to add a small rulerd scale to the map, so that users can immedieatley get a sense of scale, rather than just having the shapefile view.
I am assuming that I need to do something along the lines of horizontal line, tow or more vertical lines, text to mark the 0 and X m points; and then to work out how long these lines should be to p roduce an intelligent scale. If I have to do the line drawing, so be it - I'd rather have it all packaged up! But the main issue is (i) How do I know the scale, (ii) How do I get sensible numbers out for drawing my own scale.
What I would like is to add a small rulerd scale to the map, so that users can immedieatley get a sense of scale, rather than just having the shapefile view.
I am assuming that I need to do something along the lines of horizontal line, tow or more vertical lines, text to mark the 0 and X m points; and then to work out how long these lines should be to p roduce an intelligent scale. If I have to do the line drawing, so be it - I'd rather have it all packaged up! But the main issue is (i) How do I know the scale, (ii) How do I get sensible numbers out for drawing my own scale.
Re: How do I add a scale to the map?
Posted by:
pmeems ()
Date: June 18, 2012 01:31PM
The ocx is the only place to hold AxMap properties and methods, so you must be doing something wrong.
You can have a look at the scale bar that is created in MapWindow for some guidance.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
You can have a look at the scale bar that is created in MapWindow for some guidance.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: How do I add a scale to the map?
Posted by:
bendel_boy ()
Date: June 19, 2012 02:01AM
OK. I was relying on the 'Intellisense' with OCX componnetst o revela available properties & methods. I think you are saying that the AxMap properties are available, but not revealed by the Intellisense procedures. I will experiment, then.
Thank you.
Thank you.
Re: How do I add a scale to the map?
Posted by:
pmeems ()
Date: June 19, 2012 02:52AM
Intellisense should work.
What are you trying to do?
Did you add the ocx on a form of your own application?
The name of the ocx-control is your axMap variable.
By default it is axMap1.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
What are you trying to do?
Did you add the ocx on a form of your own application?
The name of the ocx-control is your axMap variable.
By default it is axMap1.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: How do I add a scale to the map?
Posted by:
bendel_boy ()
Date: June 19, 2012 03:00AM
I have realised that Intellisense did work - I wrote that I found the property CurrentScale, but from the help text I was looking for a property bag called AxMap, with a property within that called CurrentScale. I did not realise that AxMap was not a property name, but an example of the object name. I am used to the object name being in italics, to distinguish it from the property, nad perhaps labeleld as map-object, rather than as AxMap, which looked like a C++/C# convention for a property.
So, I can set the map scale to kilometres, retrieve a magic number that relates to how the scale maps to the screen display. After that I need to experiment with scaling lines based on CurrentScale to see how I can get something that looks like the scale in the desktop MapWindow product.
We had a DOS visualiser of some 2D river modelling results. I need to get the main representation of this working under Windows 7 - I have shape files for the river, towns, etc., and have resolved earlier adding a colour scale, and colour-coding my shapes based on attribute values. Once I add a scale I will be done. I think.
So, I can set the map scale to kilometres, retrieve a magic number that relates to how the scale maps to the screen display. After that I need to experiment with scaling lines based on CurrentScale to see how I can get something that looks like the scale in the desktop MapWindow product.
We had a DOS visualiser of some 2D river modelling results. I need to get the main representation of this working under Windows 7 - I have shape files for the river, towns, etc., and have resolved earlier adding a colour scale, and colour-coding my shapes based on attribute values. Once I add a scale I will be done. I think.
Sorry, only registered users may post in this forum.


