Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[IMPRV B827] Custom Layer Manager - Add Layer: Nothing happens

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [IMPRV B827] Custom Layer Manager - Add Layer: Nothing happens Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
[IMPRV B827] Custom Layer Manager - Add Layer: Nothing ... - 5/27/2016 5:08:57 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
I'm trying to add a custom layer and have used GMap to crate a .png file and .pgw file (renamed from .pngw).

When I use the "Add Layer" command form the "Custom Layer Manager" dialog, absolutely nothing happens.
I know the frustration of being told that "nothing happens", but trust me, after pointing out the .png file in a directory containing a .pgw with exactly the same name as the .png file, and pressing the "Open" button in the standard windows "Open file dialog", the only thing that happens is that the open file dialog disappears. Nothing is added to the list in the custom layer manager dialog, no messages in the message log window (even with "show diagnostics" checked). There is no noticeable increase in CPU usage for command.exe when pressing the open button.

* Where can I find the exact technical definition of the requirements for custom layers?
* Is there any other way to get more output (diagnostic logging, traces or something like that)?
* Do you have a public pdb so it is possible to see what goes wrong when adding a custom layer?


< Message edited by Sunburn -- 6/1/2016 12:12:00 PM >
Post #: 1
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/27/2016 6:49:11 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
Can you post the layer files? (both the graphic and the georef)

_____________________________


(in reply to I1066)
Post #: 2
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 12:50:15 AM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Ok, here it is.

I included a jpeg so you can see where the layer is supposed to show up.

Attachment (1)

(in reply to Dimitris)
Post #: 3
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 1:54:35 AM   
Rudd

 

Posts: 1501
Joined: 7/10/2013
Status: offline
I took a look at this and here's some more info for you D

When I first load the png, it shows in the Custom Layer Manager box, but doesn't show on the map.

I than loaded a different scenario, checked the location and it is now showing.






Attachment (1)

_____________________________


(in reply to I1066)
Post #: 4
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 8:34:53 AM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Well, as I said, when I try to add it "nothing happens". It does not show up in the list in Custom layer manager.


* Where can I find the exact technical definition of the requirements for custom layers?
* Is there any other way to get more output (diagnostic logging, traces or something like that)?
* Is there a public pdb so it is possible to see what goes wrong when adding a custom layer?

< Message edited by I1066 -- 5/28/2016 8:38:14 AM >

(in reply to Rudd)
Post #: 5
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 10:28:07 AM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
Thanks Rudd, that does help.

_____________________________


(in reply to I1066)
Post #: 6
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 10:30:52 AM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
quote:

ORIGINAL: I1066
* Where can I find the exact technical definition of the requirements for custom layers?

The only requirement is that they use one of the mainstream graphics formats (BMP, JPEG, PNG, GIF etc.) and that they are accompanied by a suitable georef file. A reasonable size is also assumed (not hundreds of MBs).

quote:


* Is there any other way to get more output (diagnostic logging, traces or something like that)?

Only in the debug version, which we use.

quote:


* Is there a public pdb so it is possible to see what goes wrong when adding a custom layer?

No.

We are currently looking into this.


_____________________________


(in reply to I1066)
Post #: 7
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 10:39:32 AM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
Hmmm that's interesting. Tried this with v1.11-Final (Build 825) and it worked flawlessly. The custom layer showed up immediately, both on the Layer Manager window and also on the map:



Can we get some "samples" on this? Anyone else experiencing this issue with B825 ?

_____________________________


(in reply to Dimitris)
Post #: 8
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 11:23:59 AM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Since there is no real cpu activity when adding the custom layer, my guess is that the problem is with the "suitable georef file".

What exactly is a "suitable georef file"?

What is the exact format of the file?



(in reply to Dimitris)
Post #: 9
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 11:38:29 AM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Here is one link to look at http://www.matrixgames.com/forums/tm.asp?m=3428983
There are some other places to see how to do this.

_____________________________

Michael

(in reply to I1066)
Post #: 10
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 11:43:36 AM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
I just tried it also on last v1.11 and it worked straight off for me on a blank scenario
--
You are adding the 'GMap at zoom 17 - BingSatelliteMap-635999963690950191.png' at the filename??

< Message edited by michaelm -- 5/28/2016 11:46:41 AM >


_____________________________

Michael

(in reply to michaelm75au)
Post #: 11
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 11:53:25 AM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
I checked out the link you posted, but can't really find a definition of the file format in there.

What exactly goes on each row?
What is the data type of the data for each row?
What is the accepted formats of each data type?
How do you terminate a line (\n or \r\n)?
How is whitespaces handled?
How is negative values handled?
Does file extension matter,if so, then in what way?
Does file name matter, is so, then in what way?
And so on...

(in reply to michaelm75au)
Post #: 12
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 11:57:18 AM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Yes, I am adding the .png file

(in reply to michaelm75au)
Post #: 13
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 12:01:38 PM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Okay, here is the link I was really trying to find http://baloogancampaign.com/2015/03/15/power-overlays/
It shows how to create overlays, which you did as it does load.
You don't really need to know all the things you listed.

I had no issue loading the your overlay in the latest Command (v1.11).

And this is link that explains it and pgw file http://www.matrixgames.com/forums/tm.asp?m=3530108#

< Message edited by michaelm -- 5/28/2016 12:08:13 PM >


_____________________________

Michael

(in reply to I1066)
Post #: 14
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 12:15:03 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
I don't think the issue lies with the georef file; if there was a problem with that, it would probably not load on any system.

I also tried this on a French-locale system (just in case there's an issue with dots and commas) and it worked right the first time too.

So there is likely something else, probably machine/OS-specific, going on.

< Message edited by Sunburn -- 5/28/2016 12:17:02 PM >


_____________________________


(in reply to michaelm75au)
Post #: 15
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 12:29:24 PM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
It does appear that custom overlays persist between scenario loads.
I loaded this custom overlay, and then load another of my scenarios, and out of curiosity, looked for the overlay. It was still there in my scenario. The list of custom overlays was empty, but the image was still there.

Are custom overlays suppose to persist?

Sunburn/Emsoy,
Do you want a new bug report??
Raised bug report

< Message edited by michaelm -- 5/28/2016 1:12:12 PM >


_____________________________

Michael

(in reply to Dimitris)
Post #: 16
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 12:44:12 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
Pretty sure they've always persisted. Is this a huge problem?

You are a beta tester so a bug report would be great.

Mike

< Message edited by mikmyk -- 5/28/2016 12:46:36 PM >


_____________________________


(in reply to michaelm75au)
Post #: 17
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 8:06:19 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Ok, I attached VS and there is an Exception thrown when adding the Custom Layer.

It seems like there's a problem parsing the values in the .pgw file.
I guess it has something to do with culture and number formatting.

This is the output from the C# Interactive windows when dumping CultureInfo NumberFormat info:

>CultureInfo.CurrentCulture.NumberFormat
NumberFormatInfo {
	CurrencyDecimalDigits = 2,
	CurrencyDecimalSeparator = ",",
	CurrencyGroupSeparator = ".",
	CurrencyGroupSizes = int[1]{
		3
	},
	CurrencyNegativePattern = 8,
	CurrencyPositivePattern = 3,
	CurrencySymbol = "kr",
	DigitSubstitution = None,
	IsReadOnly = true,
	NaNSymbol = "NaN",
	NativeDigits = string[10]{
		"0",
		"1",
		"2",
		"3",
		"4",
		"5",
		"6",
		"7",
		"8",
		"9"
	},
	NegativeInfinitySymbol = "-Infinity",
	NegativeSign = "-",
	NumberDecimalDigits = 2,
	NumberDecimalSeparator = ",",
	NumberGroupSeparator = " ",
	NumberGroupSizes = int[1]{
		3
	},
	NumberNegativePattern = 1,
	PercentDecimalDigits = 2,
	PercentDecimalSeparator = ",",
	PercentGroupSeparator = " ",
	PercentGroupSizes = int[1]{
		3
	},
	PercentNegativePattern = 0,
	PercentPositivePattern = 0,
	PercentSymbol = "%",
	PerMilleSymbol = "‰",
	PositiveInfinitySymbol = "Infinity",
	PositiveSign = "+"
}


Check the included file for Exception details, stack trace and a disassembly of the code where the exception occurred.

Attachment (1)

< Message edited by I1066 -- 5/28/2016 8:13:01 PM >

(in reply to mikmykWS)
Post #: 18
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/28/2016 10:18:59 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
What is your OS locale? Danish? (Guessing from "kr" currency)

_____________________________


(in reply to I1066)
Post #: 19
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/29/2016 3:29:16 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Not sure what you mean by "OS locale".

The only thing that really matters is the culture settings of the current thread.
Every user can have their own culture/region settings in windows. And even if the overall selection is, for example "English (USA)", it is possible to modify individual settings for things like decimal-separator, list-separator and so on.

I'm from Sweden, I have an English OS (Windows 7 x64), with region set to Swedish.

So here in Sweden it works like this:
 1,234     => double.Parse("1,234")     =>  1.234
 1 234     => double.Parse("1 234")     =>  1234
-1 234,567 => double.Parse("1 234,567") => -1234.567
 1.234     => double.Parse("1.234")     => Exception: "Input string was not in a correct format."

The result from double.Parse("1.234") is the same as the exception in Command.exe when loading a custom layer.

< Message edited by Sunburn -- 5/30/2016 6:00:11 PM >

(in reply to Dimitris)
Post #: 20
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 5:56:43 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
That's curious.

When processing the georef file, we explicitly swap commas with periods and use an en-US culture context for the double-parse in order to ensure there are no culture mismatches.

We'll try to make this a bit more bulletproof.

_____________________________


(in reply to I1066)
Post #: 21
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:00:20 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
Be pragmatic, parse it with a Regex and just avoid all the hassle with culture and stuff.

And don't hide any exceptions, at the very least, log then to the Windows Application log so people don't need to hook up a debugger to see the exceptions.


When you are at it, move the cursor to the center after zooming in, so further zooming don't reposition the map again.

< Message edited by I1066 -- 5/30/2016 6:07:41 PM >

(in reply to Dimitris)
Post #: 22
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:15:23 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
quote:

ORIGINAL: I1066
Be pragmatic, parse it with a Regex and just avoid all the hassle with culture and stuff.

And don't hide any exceptions, at the very least, log then to the Windows Application log so people don't need to hook up a debugger to see the exceptions.


Yes, master.

< Message edited by Sunburn -- 5/30/2016 6:18:32 PM >


_____________________________


(in reply to I1066)
Post #: 23
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:17:11 PM   
Dimitris

 

Posts: 13231
Joined: 7/31/2005
Status: offline
quote:

ORIGINAL: I1066
When you are at it, move the cursor to the center after zooming in, so further zooming don't reposition the map again.


There is an option for that.

_____________________________


(in reply to I1066)
Post #: 24
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:32:41 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
quote:

ORIGINAL: I1066

Be pragmatic, parse it with a Regex and just avoid all the hassle with culture and stuff.

And don't hide any exceptions, at the very least, log then to the Windows Application log so people don't need to hook up a debugger to see the exceptions.


When you are at it, move the cursor to the center after zooming in, so further zooming don't reposition the map again.


Stop giving D a hard time. He's sold a lot of games, won a few awards and most of us think the world of him. He's doing a good job and taking on big challenges to give people a great game experience. He doesn't need to put up with this Jr. Programmer childish ****.

Mike

< Message edited by mikmyk -- 5/30/2016 6:36:11 PM >


_____________________________


(in reply to I1066)
Post #: 25
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:35:30 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline

quote:

ORIGINAL: Sunburn

quote:

ORIGINAL: I1066
When you are at it, move the cursor to the center after zooming in, so further zooming don't reposition the map again.


There is an option for that.



There's an option to zoom to the cursor position, but after the initial zoom, the cursor should be moved to the center since it is likely you want to zoom to the point where you initially positioned the cursor, and not the to place on the map where the cursor happen to point after the initial zoom.

(in reply to Dimitris)
Post #: 26
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:46:05 PM   
I1066

 

Posts: 77
Joined: 10/22/2013
Status: offline
quote:

ORIGINAL: mikmyk
Stop giving D a hard time. He's sold a lot of games, won a few awards and most of us think the world of him. He's doing a good job and taking on big challenges to give people a great game experience. He doesn't need to put up with this Jr. Programmer childish ****.

Mike


You are welcome.
I acknowledge the appreciation after spending several hour trying to find a bug in a software I bought and paid for.

(in reply to mikmykWS)
Post #: 27
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:48:51 PM   
Kitchens Sink

 

Posts: 402
Joined: 5/4/2014
Status: offline
Where is thewood1 when he's really needed?

(in reply to mikmykWS)
Post #: 28
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:51:31 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
That money bought you the game not the right to abuse our programmer or anybody else with your stupid lectures on what's pragmatic or how to program anything.


Mike

_____________________________


(in reply to I1066)
Post #: 29
RE: Custom Layer Manager - Add Layer: Nothing happens - 5/30/2016 6:53:03 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline

quote:

ORIGINAL: Kitchens Sink

Where is thewood1 when he's really needed?


LOL exactly.

Mike

_____________________________


(in reply to Kitchens Sink)
Post #: 30
Page:   [1] 2   next >   >>
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [IMPRV B827] Custom Layer Manager - Add Layer: Nothing happens Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.359