mistake in options

Hi list, hello Steve, I made a mistake in my options file, thinking the overview-mapname made it to the Garmin screen (which is a bit stupid, now I think about it). Anyway, here's the revised options patch. Valentijn

I found two strange things: - if you don't set --overview-mapname, the tdbfile will have the name of the overview-mapnumber, 63240000.tdb, (instead of OSM_map). The source reads OSM_map, so I can't find where it goes wrong. - the --description option seems not to work, there must be something wrong with the getDescription method, as changing it to "BLAH" in the source code will work, but using a nice "--description=Nederland shows a map with the description of "OSM Map". I also couldn't find out what went wrong here. I did notice that most of the options have a args.get("option-name","default"), while description seems to have its own args.getDescription(). I wouldn't know where the description of OSM Map comes from, though. V.

It does work, you have to set all 3: series-name (mapset name in Mapsource), family-name (mapset name on GPS), description -- name for the individual map tiles - the only of the three that is written directly to the individual tiles, the both other are written to tdb/overview image. 2009/8/13 Valentijn Sessink <valentyn@blub.net>
I found two strange things:
- if you don't set --overview-mapname, the tdbfile will have the name of the overview-mapnumber, 63240000.tdb, (instead of OSM_map). The source reads OSM_map, so I can't find where it goes wrong.
- the --description option seems not to work, there must be something wrong with the getDescription method, as changing it to "BLAH" in the source code will work, but using a nice "--description=Nederland shows a map with the description of "OSM Map". I also couldn't find out what went wrong here. I did notice that most of the options have a args.get("option-name","default"), while description seems to have its own args.getDescription(). I wouldn't know where the description of OSM Map comes from, though.
V. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Valentijn Sessink wrote:
I found two strange things:
- if you don't set --overview-mapname, the tdbfile will have the name of the overview-mapnumber, 63240000.tdb, (instead of OSM_map). The source reads OSM_map, so I can't find where it goes wrong.
- the --description option seems not to work, there must be something wrong with the getDescription method, as changing it to "BLAH" in the source code will work, but using a nice "--description=Nederland shows a map with the description of "OSM Map". I also couldn't find out what went wrong here. I did notice that most of the options have a args.get("option-name","default"), while description seems to have its own args.getDescription(). I wouldn't know where the description of OSM Map comes from, though.
V The --description=XXX is displayed in mapsource in the user data tab when you select a map for upload, and forms the first part of the map name in the GPSr. If you are not using mapsource to upload maps then this could very well be different.
Are you confusing this with the series-name option which assigns the map name in the "Select a Product" drop down list in mapsource? Garvan

Hi,
Are you confusing this with the series-name option which assigns the map name in the "Select a Product" drop down list in mapsource?
What I'm trying to achieve is a change in my Garmin Nuvi map selection menu. It is currently saying: [X] --family-name [1] OSM Map [X] Regular Garmin Map Name [1] Area Of This Map (Meaning: family-name does work and changes the map name) To change "OSM Map" to "whatever" I tried all the xxxx-name options, and finally found that changing the getDescription() to a hard coded "BLAH" would work. I don't know why it didn't work another way - Felix Hartmann commented that I need to set three naming options, I did not try that yet (and I am a bit puzzled by it - if you don't set all three, the description option doesn't do anything???) So it's the Nuvi map naming that I'm after. Best regards, Valentijn -- Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7074579

Valentijn Sessink wrote:
Hi,
Are you confusing this with the series-name option which assigns the map name in the "Select a Product" drop down list in mapsource?
What I'm trying to achieve is a change in my Garmin Nuvi map selection menu. It is currently saying:
[X] --family-name [1] OSM Map [X] Regular Garmin Map Name [1] Area Of This Map
(Meaning: family-name does work and changes the map name) To change "OSM Map" to "whatever" I tried all the xxxx-name options, and finally found that changing the getDescription() to a hard coded "BLAH" would work. I don't know why it didn't work another way - Felix Hartmann commented that I need to set three naming options, I did not try that yet (and I am a bit puzzled by it - if you don't set all three, the description option doesn't do anything???)
So it's the Nuvi map naming that I'm after.
it's --family-name that you want to use. series, family and description --> that's all three. Do you transfer directly the gmapsupp (via --gmapsupp) or do you go via Mapsource? maybe you have a wrong tdb registered for Mapsource?
Best regards,
Valentijn

Felix Hartmann schreef:
it's --family-name that you want to use.
See above example. Family name is the generic map family name. "description" should show up at the place where it says "OSM Map", but it did not - so far. A hard coded "description" did, however. The source code just says: overallDescription = args.getDescription(); in src/uk/me/parabola/mkgmap/combiners/GmapsuppBuilder.java ... and I don't know why that doesn't work for me. Setting overallDescription = "Something Else"; // hard coded does work.
series, family and description --> that's all three.
So you're saying that description only works if you set family name? I can't see this in the source code, but I could be mistaken.
Do you transfer directly the gmapsupp
Yep. I'm a Linux user and MapSource will run happily under Wine, but I don't think the USB connection will work out (did try once, did not succeed, and I'm not too interested anyway). V. -- Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7074579

Felix Hartmann escribió:
Valentijn Sessink wrote:
Hi,
Are you confusing this with the series-name option which assigns the map name in the "Select a Product" drop down list in mapsource?
What I'm trying to achieve is a change in my Garmin Nuvi map selection menu. It is currently saying:
[X] --family-name [1] OSM Map [X] Regular Garmin Map Name [1] Area Of This Map
(Meaning: family-name does work and changes the map name) To change "OSM Map" to "whatever" I tried all the xxxx-name options, and finally found that changing the getDescription() to a hard coded "BLAH" would work. I don't know why it didn't work another way - Felix Hartmann commented that I need to set three naming options, I did not try that yet (and I am a bit puzzled by it - if you don't set all three, the description option doesn't do anything???)
So it's the Nuvi map naming that I'm after.
it's --family-name that you want to use. series, family and description --> that's all three. Do you transfer directly the gmapsupp (via --gmapsupp) or do you go via Mapsource? maybe you have a wrong tdb registered for Mapsource? Here you have the options I use and the result in nuvi 300. I hope this help you: --description="OpenStreetMap-Iberia" --family-name="Open Street Map" --series-name="OSM-Iberia-s" --gmapsupp I copy generated gmapsupp.img directly to the nuvi's SD. In the map selection menu I get: [ ]Open Street Map (from --family-name) [1] OpenStreetMap-Iberia (from description) Regards Carlos

Hi Carlos, Carlos Dávila schreef:
--description="OpenStreetMap-Iberia" --family-name="Open Street Map" --series-name="OSM-Iberia-s"
That's what I use, except for the --series-name.
I copy generated gmapsupp.img directly to the nuvi's SD. In the map selection menu I get: [ ]Open Street Map (from --family-name) [1] OpenStreetMap-Iberia (from description)
Carlos: do you use "-c template.args" or are you rendering the map directly? (I.e. could it be that, when you use template.args, the description is read from the template file?) Best regards, Valentijn -- Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7074579

Valentijn Sessink escribió:
Hi Carlos,
Carlos Dávila schreef:
--description="OpenStreetMap-Iberia" --family-name="Open Street Map" --series-name="OSM-Iberia-s"
That's what I use, except for the --series-name.
I copy generated gmapsupp.img directly to the nuvi's SD. In the map selection menu I get: [ ]Open Street Map (from --family-name) [1] OpenStreetMap-Iberia (from description)
Carlos: do you use "-c template.args" or are you rendering the map directly? (I.e. could it be that, when you use template.args, the description is read from the template file?)
No, I don't use "-c template.args".
Best regards,
Valentijn

Hi list, I guess I found out that --description does not work when using a "-c template-file". Is this a bug or a feature, i.e. does the source need to be patched or should I patch the documentation? (I'm willing to do the latter, but not if a fix in the source is really easy). Best regards, Valentijn -- Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7074579

Hi
I guess I found out that --description does not work when using a "-c template-file". Is this a bug or a feature, i.e. does the source need to be patched or should I patch the documentation? (I'm willing to do the latter, but not if a fix in the source is really easy).
It works as intended, so I guess it must be a documentation bug ;) What I expected to happen is that people would copy the template-file and edit it to include all the options, set the descriptions, mapname etc. as desired and then use that file with -c, rather than putting all the options on the command line. The best way to think about the template-file is that is just another way of specifying a lot of options in a more convenient way. For example if you have a file with the following contents: -=- mapname: 63240001 description: OSM Map 1 input-file: 63240001.osm.gz mapname: 63240002 description: OSM Map 2 input-file: 63240002.osm.gz -=- Then the command: java -jar mkgmap.jar -c file is *exactly* the same as saying: java -jar mkgmap.jar --mapname=63240001 --description="OSM Map 1" 63240001.osm.gz --mapname=63240002 --description="OSM Map 2" 63240002.osm.gz Options are read from left to right, and the options in force when a file is read are the ones that apply. So in this case 63240001.osm.gz will be compiled with a mapname of 63240001 and a description of "OSM Map 1", and 63240002.osm.gz will have the mapname of 63240002 and a description of 'OSM Map 2'. You can mix command line options and options in a file, there is nothing wrong with that. If you do so then still work as though you were reading from left to right and inserting the content of the file at the point it is read. So the command: java -jar mkgmap.jar --description="My Map" -c file --description="Third map" 63240003.osm.gz is exactly the same as: java -jar mkgmap.jar --description="My Map" --mapname=63240001 --description="OSM Map 1" 63240001.osm.gz --mapname=63240002 --description="OSM Map 2" 63240002.osm.gz --description="Third map" 63240003.osm.gz Now you can see that the first --description (My Map) is not used because it is the second one (which has the value 'OSM Map 1') that is the one that gets used to build the first map. If the file did not contain either of the 'description' lines, then the first and second maps would have the name 'My Map' and the third one would still have the description of 'Third map' Hope that makes it all clear. ..Steve

Steve, Steve Ratcliffe schreef:
It works as intended, so I guess it must be a documentation bug ;)
Good, I'll send a patch. My English is still better than my java programming skills (Or so I think ;)
Hope that makes it all clear.
It does. Thank you very much. V. -- Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7074579

----- Original Message ----
From: Valentijn Sessink <valentyn@blub.net> To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Sent: Thursday, 13 August, 2009 15:40:24 Subject: [mkgmap-dev] mistake in options?
I found two strange things:
- if you don't set --overview-mapname, the tdbfile will have the name of the overview-mapnumber, 63240000.tdb, (instead of OSM_map). The source reads OSM_map, so I can't find where it goes wrong.
The problem is in CommandArgsReader.java --- G:/Projects/OSM/src/mkgmap-r1131/src/uk/me/parabola/mkgmap/CommandArgsReader-1131.javaFri Jul 17 16:28:22 2009 +++ G:/Projects/OSM/src/mkgmap-r1131/src/uk/me/parabola/mkgmap/CommandArgsReader.javaThu Aug 13 17:51:32 2009 @@ -56,7 +56,7 @@ // line before any user supplied options. add(new CommandOption("mapname", "63240001")); add(new CommandOption("description", "OSM street map")); -add(new CommandOption("overview-mapname", "63240000")); +add(new CommandOption("overview-mapname", "OSM_map")); add(new CommandOption("overview-mapnumber", "63240000")); } The commited patch is the firs I submit and It is my fault that I do not mark the second submission of the patch as updated one. Please excuse me. BR Anton Todorov
participants (6)
-
Anton Todorov
-
Carlos Dávila
-
Felix Hartmann
-
Garvan & maew
-
Steve Ratcliffe
-
Valentijn Sessink