pushpin symbols from imagelist?

MapMonkey
06-23-2004, 10:21 AM
I'm rather new to MapPoint. My current vb.net project requires the use of many custom pushpin symbols. Easy enough:

If File.Exists(Application.StartupPath & "\Symbols\New.ico") Then
symNew = mSymbols.Add(Application.StartupPath & "\Symbols\New.ico")
oMap.DataSets("New").Symbol = symNew.ID
Else
oMap.DataSets("New").Symbol = 17
End If


However, I would prefer to load the custom symbols from an imagelist, keeping "inquiring minds" from "improving" the symbols used for specified db values (the whole point of the app is to standardize symbology). So far my efforts have failed.

Q: Are there options to symbols.Add(PathToImage) for loading images into the symbols collection?

Thanks in advance.

Anonymous
06-24-2004, 06:48 PM
Hi, I had the same issue a while back & found no truly slick solution….maybe someone here has one for both of us.

You could of course pump the images out into temp files at run time.

What I ended up doing was just loading the custom images by hand into a “blank” map and using it as a starting point…notionally as a sub-class of NewMap.

Another note…you may already know…it is worth setting up usable names for your symbols and referring to them in code by name rather than index. Aside from being easer to read, it saves you from having to check the MP version to calculate the starting base for custom symbols. You can also trap the errors is something is missing. Setting up an enum works really nice….MyEnum.ASymbol.ToString gives you the name and keeps your typing strong.

Anonymous
06-24-2004, 06:49 PM
Darn....keep forgetting to put my name on my posts. :oops:

 
Web mp2kmag.com
mapforums.com