Pushpin visibility / z-order

Nunezilla
03-17-2008, 01:08 PM
Hi,

I posted this question in the microsoft mappoint newsgroups before I discovered this forum, so apologies in advance for the double post for those who frequent both (I'll stick to the forum from now on).

I'm using the Mappoint 2006 ActiveX control in an MFC application. I am
plotting the route of a vehicle on a map using lines for the route and a
pushpin for the vehicle at the head of the route. The lines of the route are
showing through the pushpin icon and I'd like to find a way for the pushpin
icon to be fully visible over the line.

I've tried programmatically selecting the pushpin. This produces the
desired visual effect. However, I don't want to have to select the pushpin
because I want to allow user interaction.

I've tried changing the z-order position of the route lines. The only
z-order position that puts the lines behind the pushpin is
"geoSendBehindRoads" which is counter productive for my application.

Does anyone know of a way to make a pushpin appear selected without actually selecting it? Or does anyone know of a way to position a shape behind pushpins but in front of roads? Any other suggestions would be appreciated as well.

Thanks,
Nunezilla

Eric Frost
03-17-2008, 01:26 PM
As I remember, the "zOrder" of the Pushpins is always considered the same as the road or cartographic / map layer.. this is the problem you are having.

You can't change the zOrder of a Pushpin to be in front of a shape that is in front of the roads.

This might sound messy, but I wonder if you can use a textbox instead of a Pushpin.. see attached.

Eric

Nunezilla
03-17-2008, 01:48 PM
Hi Eric,

Thanks for the suggestion. Unfortunately, the icons are important. I'm using the standard arrow icons to indicate the direction of the vehicle so I don't think the textbox idea will work for me either.

Eric Frost
03-17-2008, 01:55 PM
I'm sure these suggestion aren't ideal either, but you could try a thicker route line and put it under the roads, or a bigger arrow.

Eric

Nunezilla
03-17-2008, 05:39 PM
Hi Eric,

Thanks again for the suggestions. You got me thinking about changing the arrow icon itself. I've replaced the default arrow icons (which are white) with some solid black custom arrow icons which match the solid black route line. Now that they match it doesn't matter which is on top. Thanks again!

Nunezilla

Eric Frost
03-17-2008, 06:08 PM
Glad to help... sorry there's not a better solution.. I know we ran into this before (Pushpins display order is tied to being just above the roads/cartographic layer) but for our purposes, we were OK with putting shapes behind the roads. Glad you found another solution..

Where there's a will.. there's a way!

(from an Orc chant :shaun: of an old Lord of the Rings animated movie)

Eric

Eric Frost
03-17-2008, 06:11 PM
Or maybe it was "where there's a whip!" :whip: yes, that was it...

 
Web mp2kmag.com
mapforums.com