GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

Transparent polygon problem in TYP files

Started by Seldom, November 22, 2009, 06:52:16 PM

Previous topic - Next topic

Seldom

When I put "none" for the second color in the polygon fragment below the polygon (which should be tan) shows up white when loaded onto my 60CSX with Sendmap 2.0.  When I replace "none" with another color value it shows up tan as expected.  

This fragment was lifted (then edited) from the sample in the cgpsmapper 9.9 download.

Thanks in advance.

[_polygon]
Type=0x14
string1=4,LAS
string1=0x14,LAS
XPM="32 32 2 1",
"!   c #FF7700",
"#   c none",
"#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!",
"#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!",
"!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#",
"!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#",
"#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!",
... 32 lines total ...
"#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!",
"#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!",
"!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#",
"!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#"};
[end]

I just tried using #000000 as the transparent color definition instead of "none" and it seems to have worked.  Polygon is tan.  Has anybody had any success with "none"?

Boyd

I used custom types in cgpsmapper for awhile but switched to Mapwel because it is SO much easier and ASCII art is just a little too retro for my tastes.  :)

But here's a transparent polygon from one of my old files which seemed to work fine on the Nuvi, 60csx and Oregon. Just offhand, I don't see the difference, other than perhaps your lack of night colors?

What happens if you replace my color with yours in this example?


[_polygon]
Type=0x14
String2=0x04,National Park
XPM="32 32 4 1"
". c #00ff1d"
"X c none"
"3 c #398943"
"4 c none"
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
"X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X."
[end]

Seldom

Thanks, Boyd.  The use of day/night (4 colors) makes it work.  I may look at Mapwel sometime, but I'm a retro guy, and would hate to give up my text editor.  Heck, even MapSetToolkit makes me nervous. 

Besides, between my GM 11 upgrade and paying for GPSMapedit, so I could get Google underlays there, I've pretty much blown my allowance.

Boyd

I believe the user defined style editor is fully functional in the demo version of Mapwel and will let you export a text file to be used in cgpsmapper. You will probably need to tweak it with a text editor though. Mapwel gives you over 70 user defined styles (ie: custom types) to work with but does not allow you to redefine the standard types. See: http://mapwel.eu/userstyles/userstyles.html

Seldom

Thanks, I'll have a look.  It does look like pattern generation could be pretty tedious before I get something that looks right.

Boyd

I made extensive use of custom types in one of my maps, and it was indeed tedious with cgpsmapper. Aside from the "ASCII art", the whole cycle is really time consuming: code it, compile, copy to the gps, look at it on the screen, repeat. The WYSIWYG display mode in Mapwel is great for this. The custom types look pretty much like what you see on the GPS. Some things are a bit different, like the way text is displayed, but the polygon fills, lines and points are pretty faithful.

See this old thread: http://forums.gpsfiledepot.com/index.php/topic,152.0.html

Evidently the files don't work properly in Mapsource though. I don't use mapsource myself for very much, so I don't really care, but it's a big issue for others.

Seldom

#6
Here are some screen shots of a conflict I noticed while  trying to make a transparent polygon.  The code for the first two images follows:[_polygon]
Type=0x14
string1=4,LAS
string1=0x14,LAS
XPM="32 32 2 1",
"# c #006666",
"! c none",
"3  c #006666",
"4  c none",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!",
"#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!",
"!!#!!!#!!!#!!!#!!!#!!!#!!!#!!!#!"};
[end]


The first two are supposed to be green and transparent.

Garmin screen shot, scaled up to show colors, pretty much what I expected.
Colors 006666 and "none".


OR300 same code as Garmin, but the color is wrong.


When I revise the code as follows, the OR300 looks right, but the 60CSX looks wrong.

[_polygon]
Type=0x14
string1=4,LAS
string1=0x14,LAS
XPM="32 32 2 1",
"# c #006666",
" c none",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # ",
"#   #   #   #   #   #   #   #   ",
"  #   #   #   #   #   #   #   # "};
[end]


OR300 thus:


60CSX thus:


60CSX daytime thus:


Seldom

Full codes and a daylight screenshot for the 60CSX are edited in above.

Haven't figured out where to set the OR 300 to get day/night colors.  Right now is shows as day colors all 24 hours.

Got the color selection by reading the comments in sampleTYP.txt, which came with cgpsmapper.  I didn't see any limitations on which hex codes to use. Got this one from a hex to color web converter, and it was easy to remember.  Would something like 006060 have been a better choice?

Boyd

First, there are clearly some bugs in cgpsmapper and more likely than not, you have found one.  ;)

Second, the Oregon doesn't have a night mode, so that might very well be an issue. If you don't like the tan background on the Oregon, you can set a different background color with cgpsmapper and that might help.

It's been awhile since I've done this, but I think the only way I was able to do that and get the results I wanted was to create a big rectangle the size of the whole map.

Seldom

Thanks, guys.

The purpose of my posts is for a transparent overlay I'm working on.  The idea is to put together a transparent map with contours, hydrography, forests, and GNIS, everything but roads, and overlay that on CityNavNT, or some other reliable routable map (OSM perhaps).  The map will include several national parks, which I wanted to describe as transparent polygons.  When I tried this a couple years ago, the solid park polygon on my otherwise transparent overlay hid the CityNavNT features inside the park.  The workaround was to have GM create a boundary around the park polygon and delete the polygon.

As I write this, it probably makes more sense to rely on the underlying routable map for boundary information, and just put natural features and GNIS on the transparent map.

Boyd

#10
Yes, there's a separate settings menu for marine which has those same options, plus a few others it appears. Have never tried it on a regular map myself.

Haha, I like your "swiss cheese" analogy. But to be a little more specific... lines are always drawn on top of polygons with custom types. And the "swiss cheese" polygons will allow a certain degree of visibility for other polygons which are beneath them.

But I think this only works within one map. If you enable a second mapset on the GPS which is "under" the one with the "swiss cheese", I don't think you can see through the holes in the cheese to the map below. So it will appear as if the swiss cheese has plugged-up holes and the polygon will hide everything on the map below.

Boyd

Quote from: seldom_sn on November 26, 2009, 05:21:34 PMThe polygon will be transparent in single gmapsupp.img made of multiple maps.

Aha, that's interesting, hadn't thought of that distinction. But if you want to use your map with City Navigator, doesn't that mean you would need City Navigator on DVD, and you would have to create a mapset using parts of it as well as your map, then send to the GPS? That wouldn't be a solution for the Nuvi then.

Seldom

Quote from: Boyd on November 26, 2009, 05:28:27 PM
But if you want to use your map with City Navigator, doesn't that mean you would need City Navigator on DVD, and you would have to create a mapset using parts of it as well as your map, then send to the GPS? That wouldn't be a solution for the Nuvi then.

Actually, If you just use MapSource to send the transparent Topo to a gmapsupp.img on a card, and put the card in a Nuvi, that works.  Transparent Topo sits on top of the Nuvi (At least my Nuvi 660) road map.  Or you put the combined CityNavNT + transparent topo together into a single gmapsupp.img that you can use on a handheld.