MapWindow 4 - Plugins : MapWindow Discussion Forum
Hello everyone, The MapWindow team has just completed developement of a new layout engine for the MapWindow 4 application. It is based on code developed for the new MapWindow 6 and should give you a taste of some of the new functionality that we are developing. The layout files gener
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 28, 2009 02:58PM
Hey guys,
I've released another update.
There is now a Zoom to data view extent button, on the map toolbar. Also I regret to inform you that old layout files will be broken if they contain a legend, so if you've got any layouts you wanna keep open them in the old version delete their legends, save them, upgrade, re-add legend. This is because after some discussion here on the MapWindow 6 end of things, we've added support for saving the number of columns.
Brian
I've released another update.
There is now a Zoom to data view extent button, on the map toolbar. Also I regret to inform you that old layout files will be broken if they contain a legend, so if you've got any layouts you wanna keep open them in the old version delete their legends, save them, upgrade, re-add legend. This is because after some discussion here on the MapWindow 6 end of things, we've added support for saving the number of columns.
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 28, 2009 03:10PM
Nomo,
If you've created a shapefile of polygons that contains the extent of each map you want to create, it would be trivial to create a plug-in which utilises the layout engine to print a collection of maps each based on the extents of a single polygon from that file. I wrote a similar script for ArcView 3.3 a long time ago. If you'd like I could write it for you pro bono if you willing to let me list your employer as one of my customers on my company website. I'm starting a custom GIS software company base in Montreal, Canada.
Brian
If you've created a shapefile of polygons that contains the extent of each map you want to create, it would be trivial to create a plug-in which utilises the layout engine to print a collection of maps each based on the extents of a single polygon from that file. I wrote a similar script for ArcView 3.3 a long time ago. If you'd like I could write it for you pro bono if you willing to let me list your employer as one of my customers on my company website. I'm starting a custom GIS software company base in Montreal, Canada.
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: August 28, 2009 09:02PM
Brian - mostly works, but I had a few issues.
Here's what I did for the very first trial: the active tool on the MW map was the zoom-in tool. Made a new print layout, add a map, immediate click on the MW map, which caused it to zoom into the new area. Clicked the new Extents button in the layout, and was greeted with an error dialog. It told me that "a picture was not returned from the application" (or words to that effect) and that I should close the layout. I have NOT been able to reproduce this error.
However, this behaviour is repeatable (if somewhat unfair!). If you change the size of the map on the print layout, then go to MW and change the extents of the map, then return to the layout and click the new Extents button, then the map on the layout will turn solid black. Click the Extents button for a second time, and it displays properly. Not a huge deal, but incorrect behaviour nonetheless.
Good stuff though! Keep up the good work.
PS I checked out the area code in your contact info, and deduced you were in Montreal. My company has an office in Montreal (I am in Vancouver) If work ever takes me out that way (happens infrequently!), maybe I will give you a call.
Here's what I did for the very first trial: the active tool on the MW map was the zoom-in tool. Made a new print layout, add a map, immediate click on the MW map, which caused it to zoom into the new area. Clicked the new Extents button in the layout, and was greeted with an error dialog. It told me that "a picture was not returned from the application" (or words to that effect) and that I should close the layout. I have NOT been able to reproduce this error.
However, this behaviour is repeatable (if somewhat unfair!). If you change the size of the map on the print layout, then go to MW and change the extents of the map, then return to the layout and click the new Extents button, then the map on the layout will turn solid black. Click the Extents button for a second time, and it displays properly. Not a huge deal, but incorrect behaviour nonetheless.
Good stuff though! Keep up the good work.
PS I checked out the area code in your contact info, and deduced you were in Montreal. My company has an office in Montreal (I am in Vancouver) If work ever takes me out that way (happens infrequently!), maybe I will give you a call.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 29, 2009 12:09AM
Hi Jack,
Thanks for the feedback. That error message is the bane of this entire project. I have absolutely no idea what causes it. I actually wrote it, its kind of a catch all for the map not returning data when data is expected. From what I can tell the only way to fix it once it has occurred is to close the layout form. It really doesn't make any sense that doing so should fix it but it does! I've tried my best to mitigate its appearance but I guess you've stumbled upon yet another way.
As for the second part, with the black, I'll take a look at it. When using the layout tool its really important that you set a map unit, if not it acts kinda wonky. I've been trying to correct for this but there no simple solution since so much depends on units making sense. I suspect this might be related to map units, were you working with lat/long or meters or feet...
Thanks for being my guinea pigs everyone.
Meeting up would be great, always good to meet MapWindow users. I'm actually in the process of wrapping up my masters degree in GIS here in Idaho with the MapWindow team, moving home to Montreal at the end of Sept. I'm presenting a MapWindow paper at the Geomatics 2009 conference in Montreal in Oct. and I'll be at the MapWindow users conference in Orlando in April, you should try to come to the MapWindow conference and meet the team you too Nomo and I know Paul is going to be there. Do you mind if I ask what company you work for? Maybe I've heard of them.
Brian
Thanks for the feedback. That error message is the bane of this entire project. I have absolutely no idea what causes it. I actually wrote it, its kind of a catch all for the map not returning data when data is expected. From what I can tell the only way to fix it once it has occurred is to close the layout form. It really doesn't make any sense that doing so should fix it but it does! I've tried my best to mitigate its appearance but I guess you've stumbled upon yet another way.
As for the second part, with the black, I'll take a look at it. When using the layout tool its really important that you set a map unit, if not it acts kinda wonky. I've been trying to correct for this but there no simple solution since so much depends on units making sense. I suspect this might be related to map units, were you working with lat/long or meters or feet...
Thanks for being my guinea pigs everyone.
Meeting up would be great, always good to meet MapWindow users. I'm actually in the process of wrapping up my masters degree in GIS here in Idaho with the MapWindow team, moving home to Montreal at the end of Sept. I'm presenting a MapWindow paper at the Geomatics 2009 conference in Montreal in Oct. and I'll be at the MapWindow users conference in Orlando in April, you should try to come to the MapWindow conference and meet the team you too Nomo and I know Paul is going to be there. Do you mind if I ask what company you work for? Maybe I've heard of them.
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 29, 2009 12:39AM
Hey Jack,
I've been trying to reproduce that black bug for a little while now with no success. Can you try to describe exactly what you did to cause it, what data you had loaded etc.
Thanks,
Brian
I've been trying to reproduce that black bug for a little while now with no success. Can you try to describe exactly what you did to cause it, what data you had loaded etc.
Thanks,
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
dimpflmoser ()
Date: August 29, 2009 07:09AM
Hello everybody,
this sounds great! I wonder if the plugin is usable in conjunction with the ActiveX-Control? If this would be possible, could anybody give some example-code how to use it?
Thanks and regards
Helmut
this sounds great! I wonder if the plugin is usable in conjunction with the ActiveX-Control? If this would be possible, could anybody give some example-code how to use it?
Thanks and regards
Helmut
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 29, 2009 09:48AM
Hi Helmut,
Theoretically it could work with the ActiveX control, but in its current incarnation it can't. It relies on the MapWinInterface object because it needs access to both the map and the legend objects (So you can add both to you layout). I could overload the constructor with one that uses the ActiveX control, but you would not be able to use the legend layout element since there is no legend object on the ActiveX control. Maybe I could modify the constructor to accept both a ActiveX map and a Legend control, that way if you have a project with both you could use it, and if you don't have a legend you could just set the legend object in the constructor to null and we just wouldn't draw it. Ok Helmut, gimme a little while and I'll see if I can get this to work outside of a plug-in.
Brian
Theoretically it could work with the ActiveX control, but in its current incarnation it can't. It relies on the MapWinInterface object because it needs access to both the map and the legend objects (So you can add both to you layout). I could overload the constructor with one that uses the ActiveX control, but you would not be able to use the legend layout element since there is no legend object on the ActiveX control. Maybe I could modify the constructor to accept both a ActiveX map and a Legend control, that way if you have a project with both you could use it, and if you don't have a legend you could just set the legend object in the constructor to null and we just wouldn't draw it. Ok Helmut, gimme a little while and I'll see if I can get this to work outside of a plug-in.
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 29, 2009 02:18PM
New layout.dll version posted.
Ok Helmut,
I've modified the layout engine extensively, it can now be used in a application that uses the ActiveX Map with or without the legend.
The easy way it to simply create an instance of the LayoutForm and show it. The hard way would be to use each of the layout elements to create your own form, you can do it this way but you must make sure to use components that end in MW4 when available.
So the simple one first:
Create a stand alone app as usual drop a AxMap control on a form (legend if you like)
Add a reference to layout.dll (you also need MapWinGeoProc.dll, MapWinInterfaces.dll, MapWinGIS.dll and AxMapWinGIS.dll)
//Heres how to run it with a legend.
string mapunit = "lat/long"; //Replace with your relevant unit
mwLayout.LayoutFormMW4 mwLF = new mwLayout.LayoutFormMW4(ref axMap1,ref legend1, ref mapunit);
mwLF.Show();
//Heres how to run it without a legend, (Legend elements in the layout will be blank)
string mapunit = "lat/long"; //Replace with your relevant unit
LegendControl.Legend filler = null;
mwLayout.LayoutFormMW4 mwLF = new mwLayout.LayoutFormMW4(ref axMap1,ref filler, ref mapunit);
mwLF.Show();
The Complicated one:
Now if you want to use the individual components of the layout, just right click in your toolbox click choose items and browse to MapWinInterfaces.dll then layout.dll you'll get a bunch of new stuff, some of them are for MapWindow 6 and probably wont work here. What you want are the items that start with Layout... There are two LayoutControl (You must use the one that ends with MW4 the other one is for MapWindow 6)
Once you've done that you can drag and drog Layout... pieces onto your form. When you've gotten them all placed, click on the LayoutControlMW4 control that you placed and set all of the Misc properties to appropriate Layout... things. Even you aren't going to use one leave it blank.
Next in code you must call
LayoutControlMW4.Initialize(ref axMap1,ref legend, ref mapunit);
Or the layout control wont be connected to a map.
If you've got any questions just post them in here and I'll try and help you out. Please remember this very beta, so if you get some weird behavior please let me know.
Brian
Oh and everyone who is using the plug-in please play with it some more and make sure I didn't break anything with these modifications.
Ok Helmut,
I've modified the layout engine extensively, it can now be used in a application that uses the ActiveX Map with or without the legend.
The easy way it to simply create an instance of the LayoutForm and show it. The hard way would be to use each of the layout elements to create your own form, you can do it this way but you must make sure to use components that end in MW4 when available.
So the simple one first:
Create a stand alone app as usual drop a AxMap control on a form (legend if you like)
Add a reference to layout.dll (you also need MapWinGeoProc.dll, MapWinInterfaces.dll, MapWinGIS.dll and AxMapWinGIS.dll)
//Heres how to run it with a legend.
string mapunit = "lat/long"; //Replace with your relevant unit
mwLayout.LayoutFormMW4 mwLF = new mwLayout.LayoutFormMW4(ref axMap1,ref legend1, ref mapunit);
mwLF.Show();
//Heres how to run it without a legend, (Legend elements in the layout will be blank)
string mapunit = "lat/long"; //Replace with your relevant unit
LegendControl.Legend filler = null;
mwLayout.LayoutFormMW4 mwLF = new mwLayout.LayoutFormMW4(ref axMap1,ref filler, ref mapunit);
mwLF.Show();
The Complicated one:
Now if you want to use the individual components of the layout, just right click in your toolbox click choose items and browse to MapWinInterfaces.dll then layout.dll you'll get a bunch of new stuff, some of them are for MapWindow 6 and probably wont work here. What you want are the items that start with Layout... There are two LayoutControl (You must use the one that ends with MW4 the other one is for MapWindow 6)
Once you've done that you can drag and drog Layout... pieces onto your form. When you've gotten them all placed, click on the LayoutControlMW4 control that you placed and set all of the Misc properties to appropriate Layout... things. Even you aren't going to use one leave it blank.
Next in code you must call
LayoutControlMW4.Initialize(ref axMap1,ref legend, ref mapunit);
Or the layout control wont be connected to a map.
If you've got any questions just post them in here and I'll try and help you out. Please remember this very beta, so if you get some weird behavior please let me know.
Brian
Oh and everyone who is using the plug-in please play with it some more and make sure I didn't break anything with these modifications.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: August 31, 2009 05:59PM
Brian
When I posted about the black window, I was able to reproduce it every time. Now, it's just as elusive for me as it is for you. I've now got it appearing, but I can't put my finger on the common denominator to make it appear every time!
I've simply loaded a MW project, immediately opened a layout window, and added a map. Just using the Pan tool in MW to drag the map around, and the drag-stretch handles on the Layout window to alter the map size.
For the the bug to appear, I resize the layout map, Alt-tab to MW, drag the map to a new location, Alt-tab to the Layout window, and click the Extents button. Sometimes it goes black, sometimes not. I would guess the bug appears about 25% of the time. I've tried with different aspect ratios, and shrinking or enlarging the map window. All these things make the bug appear, but nothing consistent.
I know that's not much help. This is using the DLL from about 3 days ago. I haven't yet downloaded your latest version. Running under Vista Home Premium. BTW, you should consider adding a version number to the Help/About.
I work for FPInnovations, a forestry research organization. Our MTL office is located in Pt Claire.
When I posted about the black window, I was able to reproduce it every time. Now, it's just as elusive for me as it is for you. I've now got it appearing, but I can't put my finger on the common denominator to make it appear every time!
I've simply loaded a MW project, immediately opened a layout window, and added a map. Just using the Pan tool in MW to drag the map around, and the drag-stretch handles on the Layout window to alter the map size.
For the the bug to appear, I resize the layout map, Alt-tab to MW, drag the map to a new location, Alt-tab to the Layout window, and click the Extents button. Sometimes it goes black, sometimes not. I would guess the bug appears about 25% of the time. I've tried with different aspect ratios, and shrinking or enlarging the map window. All these things make the bug appear, but nothing consistent.
I know that's not much help. This is using the DLL from about 3 days ago. I haven't yet downloaded your latest version. Running under Vista Home Premium. BTW, you should consider adding a version number to the Help/About.
I work for FPInnovations, a forestry research organization. Our MTL office is located in Pt Claire.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 31, 2009 11:14PM
Hi Jack,
Thats for trying to help narrow this down. Why don't you checkout the latest version and see if you can still get it to happen. I've been trying for a little while now, its possible that I might have fixed it inadvertently while working on some other things, I've reworked a lot of that extent code recently.
Do you have any weird data types in your projects, something other than shapefiles?
Version number is a good idea, I'll add that soon. I've only tested this on windows XP. Maybe should get it on one of the vista machines and test it out, are you running 32bit or 64bit?
Brian
Thats for trying to help narrow this down. Why don't you checkout the latest version and see if you can still get it to happen. I've been trying for a little while now, its possible that I might have fixed it inadvertently while working on some other things, I've reworked a lot of that extent code recently.
Do you have any weird data types in your projects, something other than shapefiles?
Version number is a good idea, I'll add that soon. I've only tested this on windows XP. Maybe should get it on one of the vista machines and test it out, are you running 32bit or 64bit?
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: August 31, 2009 11:56PM
Alright,
I've just released version 1.0.3530.41264
Threw in a couple little fixes, and the version number in the about page.
Brian
I've just released version 1.0.3530.41264
Threw in a couple little fixes, and the version number in the about page.
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: September 01, 2009 08:13AM
Brian
I tried the version prior to 1.0.3530.41264 and still had the problem. Still no closer to figuring out a common denominator. My *suspicion* is that it's associated with a mismatch of aspect ratio between the MW map and the Layout map.
I will try 1.0.3530.41264 when I get home tonight. Will also try with the latest MW build from SVN.
AFAIK, nothing in the project is unusual, but I will try a second project just to be sure.
I tried the version prior to 1.0.3530.41264 and still had the problem. Still no closer to figuring out a common denominator. My *suspicion* is that it's associated with a mismatch of aspect ratio between the MW map and the Layout map.
I will try 1.0.3530.41264 when I get home tonight. Will also try with the latest MW build from SVN.
AFAIK, nothing in the project is unusual, but I will try a second project just to be sure.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: September 01, 2009 08:28PM
Brian
It's a good news / bad news item. Good news is that I could not get the black map bug to appear with the "latest" SVN version and your 1.0.3530.41264 DLL. Looks like it is quashed.
Bad news - and this is probably for Chris M. A similar "black map" bug made its appearance in MW itself. I loaded my test project (completely static, no changes for a long time!) and I was presented with an absolutely blank map. When I resized the MW window (the application window itself), the map turned black. No way to view anything on the map. Using the "New project" button had no effect. Only recourse was to restart MW. Tried loading a single layer, and was successful. Tried the whole project again, and was again presented with the black map.
Used SVN to revert to versions 9217 and 9228. Both worked properly. Updated to the 9297 (Aug 28) version, and got the black map treatment again. Reverted to version 9228, and its working properly. I will wait for the weekly build on SVN before trying another update.
PS - a minor bug on the print layout dll. Create a scale bar, then change the units to metres, feet, or whatever. The caption on the scale bar remains as "km".
It's a good news / bad news item. Good news is that I could not get the black map bug to appear with the "latest" SVN version and your 1.0.3530.41264 DLL. Looks like it is quashed.
Bad news - and this is probably for Chris M. A similar "black map" bug made its appearance in MW itself. I loaded my test project (completely static, no changes for a long time!) and I was presented with an absolutely blank map. When I resized the MW window (the application window itself), the map turned black. No way to view anything on the map. Using the "New project" button had no effect. Only recourse was to restart MW. Tried loading a single layer, and was successful. Tried the whole project again, and was again presented with the black map.
Used SVN to revert to versions 9217 and 9228. Both worked properly. Updated to the 9297 (Aug 28) version, and got the black map treatment again. Reverted to version 9228, and its working properly. I will wait for the weekly build on SVN before trying another update.
PS - a minor bug on the print layout dll. Create a scale bar, then change the units to metres, feet, or whatever. The caption on the scale bar remains as "km".
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: September 01, 2009 10:04PM
Hi Jack,
Thats definitely seems fishy, I'll take a look at it, I have not seen anything like that from the latest builds. When you downloaded the new version from the SVN did you run regMapWinGIS.cmd, you have to run that every time the OCX changes to register it to the new version, if not all sorts of weird things can happen.
The bug you found on the scale bar is a feature. You can change the text to whatever you like via one of the other properties. I could make it change the text automatically but that might annoy people if they write something in there and it overwrites it. Or maybe not .. I dunno, I'll ask the guys in the lab if they have any suggestions.
Thanks for testing again!
Brian
Thats definitely seems fishy, I'll take a look at it, I have not seen anything like that from the latest builds. When you downloaded the new version from the SVN did you run regMapWinGIS.cmd, you have to run that every time the OCX changes to register it to the new version, if not all sorts of weird things can happen.
The bug you found on the scale bar is a feature. You can change the text to whatever you like via one of the other properties. I could make it change the text automatically but that might annoy people if they write something in there and it overwrites it. Or maybe not .. I dunno, I'll ask the guys in the lab if they have any suggestions.
Thanks for testing again!
Brian
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: September 02, 2009 08:40PM
Brian
Well! live and learn. registering the OCX did the trick. I've never run into that before. As for the scalebar label... mea culpa. My layout window was a bit too short, and I did not notice the "UnitText" entry in the property screen. D'oh!
Thanks again for your hard work.
Jack
Well! live and learn. registering the OCX did the trick. I've never run into that before. As for the scalebar label... mea culpa. My layout window was a bit too short, and I did not notice the "UnitText" entry in the property screen. D'oh!
Thanks again for your hard work.
Jack
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: September 02, 2009 10:27PM
Hi Everyone,
I'm glad we got that all sorted out. Jack thanks for your help.
I don't think I'll be adding any new features to the layout engine, it seems quite functional now so I'm going to consider it done for the moment, unless someone jumps on here an announces new features that are needed.
Thanks for your help everyone,
Brian
Edited 1 time(s). Last edit at 09/02/2009 10:27PM by bmarch.
I'm glad we got that all sorted out. Jack thanks for your help.
I don't think I'll be adding any new features to the layout engine, it seems quite functional now so I'm going to consider it done for the moment, unless someone jumps on here an announces new features that are needed.
Thanks for your help everyone,
Brian
Edited 1 time(s). Last edit at 09/02/2009 10:27PM by bmarch.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: September 03, 2009 09:15AM
Brian - hate to do this to you, but I've run into another problem. Made and saved a layout using one project, then tried to open the layout file in another project. Reduced to the minimum to find the bug, and found that adding a map and a scale bar was minimum content to trigger the bug.
When opening the layout file using the offending project, an error message is displayed that says the value was too large or too small for the Int32.
I think it has to do with the original MW projection. Project 1 is BC Albers projection. Create and save a layout containing only a map and a scalebar. Project 2 is Geographic WGS1984. Try opening the layout, and the error message appears. Conversely, a layout made from Project 2 opens successfully in Project 1.
This layout file causes the error when opening in Project 2 (Geographic)
<MapWindowLayout>
<Element Name="Scale Bar 1" RectangleX="654.947" RectangleY="719.434631" RectangleWidth="396.466431" RectangleHeight="79.6819458" ResizeStyle="HandledInternally">
<ScaleBar TextHint="AntiAliasGridFit" Color="Black" Font="Arial, 10pt" BreakBeforeZero="False" NumberOfBreaks="4" Unit="Kilometers" UnitText="km" Map="1" />
</Element>
<Element Name="Map 1" RectangleX="29.1519718" RectangleY="29.50531" RectangleWidth="600.53" RectangleHeight="779.3286" ResizeStyle="NoScaling">
<Map EnvelopeXmin="1087498.2163713579" EnvelopeYmin="349192.26861495367" EnvelopeXmax="1206322.9806976621" EnvelopeYmax="503395.27976880729" />
</Element>
</MapWindowLayout>
This layout file works fine in either project:
<MapWindowLayout>
<Element Name="Scale Bar 1" RectangleX="792.932861" RectangleY="713.6042" RectangleWidth="260.42395" RectangleHeight="93.2862549" ResizeStyle="HandledInternally">
<ScaleBar TextHint="AntiAliasGridFit" Color="Black" Font="Arial, 10pt" BreakBeforeZero="False" NumberOfBreaks="4" Unit="Kilometers" UnitText="km" Map="1" />
</Element>
<Element Name="Map 1" RectangleX="36.9258232" RectangleY="21.7314587" RectangleWidth="728.7985" RectangleHeight="777.385132" ResizeStyle="NoScaling">
<Map EnvelopeXmin="-102.16040626281537" EnvelopeYmin="53.755838047918267" EnvelopeXmax="-100.69090649298161" EnvelopeYmax="55.323304551119044" />
</Element>
</MapWindowLayout>
When opening the layout file using the offending project, an error message is displayed that says the value was too large or too small for the Int32.
I think it has to do with the original MW projection. Project 1 is BC Albers projection. Create and save a layout containing only a map and a scalebar. Project 2 is Geographic WGS1984. Try opening the layout, and the error message appears. Conversely, a layout made from Project 2 opens successfully in Project 1.
This layout file causes the error when opening in Project 2 (Geographic)
<MapWindowLayout>
<Element Name="Scale Bar 1" RectangleX="654.947" RectangleY="719.434631" RectangleWidth="396.466431" RectangleHeight="79.6819458" ResizeStyle="HandledInternally">
<ScaleBar TextHint="AntiAliasGridFit" Color="Black" Font="Arial, 10pt" BreakBeforeZero="False" NumberOfBreaks="4" Unit="Kilometers" UnitText="km" Map="1" />
</Element>
<Element Name="Map 1" RectangleX="29.1519718" RectangleY="29.50531" RectangleWidth="600.53" RectangleHeight="779.3286" ResizeStyle="NoScaling">
<Map EnvelopeXmin="1087498.2163713579" EnvelopeYmin="349192.26861495367" EnvelopeXmax="1206322.9806976621" EnvelopeYmax="503395.27976880729" />
</Element>
</MapWindowLayout>
This layout file works fine in either project:
<MapWindowLayout>
<Element Name="Scale Bar 1" RectangleX="792.932861" RectangleY="713.6042" RectangleWidth="260.42395" RectangleHeight="93.2862549" ResizeStyle="HandledInternally">
<ScaleBar TextHint="AntiAliasGridFit" Color="Black" Font="Arial, 10pt" BreakBeforeZero="False" NumberOfBreaks="4" Unit="Kilometers" UnitText="km" Map="1" />
</Element>
<Element Name="Map 1" RectangleX="36.9258232" RectangleY="21.7314587" RectangleWidth="728.7985" RectangleHeight="777.385132" ResizeStyle="NoScaling">
<Map EnvelopeXmin="-102.16040626281537" EnvelopeYmin="53.755838047918267" EnvelopeXmax="-100.69090649298161" EnvelopeYmax="55.323304551119044" />
</Element>
</MapWindowLayout>
Re: MapWindow 4 Print Layout Plug-in
Posted by:
bmarch ()
Date: September 03, 2009 03:00PM
Jack I told you I was done working on this = )
Alright so you were on the money with that one. Loading an extent that isn't in lat/long and attempting to calculate its extent using a lat/long conversion factor was producing a number to big to fit in a int32.
So since load a layout that was made with data that isn't in lat/long would likely load a map that made no sense. It now checks if the scale is so big that is causes a int32 size exception, it adds the map and sets the extent to that of the view.
Brian
Latest and greatest version is: 1.0.3533.24981
Edited 1 time(s). Last edit at 09/03/2009 03:01PM by bmarch.
Alright so you were on the money with that one. Loading an extent that isn't in lat/long and attempting to calculate its extent using a lat/long conversion factor was producing a number to big to fit in a int32.
So since load a layout that was made with data that isn't in lat/long would likely load a map that made no sense. It now checks if the scale is so big that is causes a int32 size exception, it adds the map and sets the extent to that of the view.
Brian
Latest and greatest version is: 1.0.3533.24981
Edited 1 time(s). Last edit at 09/03/2009 03:01PM by bmarch.
Re: MapWindow 4 Print Layout Plug-in
Posted by:
jacksonmacd ()
Date: September 03, 2009 07:42PM
Thanks Brian. I will lay off now ;-)
Jack
Jack
Re: MapWindow 4 Print Layout Plug-in
Posted by:
tomc ()
Date: September 17, 2009 06:57PM
Could you please let me know the minimum version of MW needed to get this plugin working?
I have been trying the layout and getting heaps of errors.
Am using MW 4.7.909 and the current layout.dll
havent upgrade to latest version of MW due to the need to keep using ECW images, and tech support are not keen on frequent updates here. Or do I have to force upgrade?
I have been trying the layout and getting heaps of errors.
Am using MW 4.7.909 and the current layout.dll
havent upgrade to latest version of MW due to the need to keep using ECW images, and tech support are not keen on frequent updates here. Or do I have to force upgrade?
Sorry, only registered users may post in this forum.


