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

Post bug reports and ask for game support here.

Moderator: MOD_Command

I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

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

Post by I1066 »

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?
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

Can you post the layer files? (both the graphic and the georef)
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

Ok, here it is.

I included a jpeg so you can see where the layer is supposed to show up.
Attachments
CustomLayer.zip
(3.54 MiB) Downloaded 12 times
Rudd
Posts: 468
Joined: Wed Jul 10, 2013 10:34 am

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Rudd »

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.



Image
Attachments
ukpic.jpg
ukpic.jpg (312.48 KiB) Viewed 176 times
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

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?
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

Thanks Rudd, that does help.
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

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).
* Is there any other way to get more output (diagnostic logging, traces or something like that)?
Only in the debug version, which we use.
* 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.
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

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:

Image

Can we get some "samples" on this? Anyone else experiencing this issue with B825 ?
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

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?


User avatar
michaelm75au
Posts: 12455
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by michaelm75au »

Here is one link to look at tm.asp?m=3428983
There are some other places to see how to do this.
Michael
User avatar
michaelm75au
Posts: 12455
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by michaelm75au »

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??
Michael
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

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...
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

Yes, I am adding the .png file
User avatar
michaelm75au
Posts: 12455
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by michaelm75au »

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 tm.asp?m=3530108#
Michael
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

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.
User avatar
michaelm75au
Posts: 12455
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by michaelm75au »

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
Michael
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by mikmykWS »

Pretty sure they've always persisted. Is this a huge problem?

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

Mike
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

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:

Code: Select all

 >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"
 	},

Code: Select all

 	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.
Attachments
ExceptionInfo.txt
(11.53 KiB) Downloaded 5 times
Dimitris
Posts: 14792
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by Dimitris »

What is your OS locale? Danish? (Guessing from "kr" currency)
I1066
Posts: 77
Joined: Tue Oct 22, 2013 3:26 pm

RE: Custom Layer Manager - Add Layer: Nothing happens

Post by I1066 »

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:

Code: Select all

  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.
Post Reply

Return to “Tech Support”