Hi,
We wanted to have an adornment layer that the user can click on (eg a hyperlink to an external web page). I was just wondering if this is at all possible? I took a look at the AdornmentLayer and Layer classes, and it doesn’t look like this kind of thing is supported.
It looks like I would have to handle the MapClick event, and then work out whether the clicked point is over my adornment layer?
Thanks,
Steve
Clickable adornment layer
Hi Steve,
You are right, it can’t support that case directly. However, just like you said, we still can do that with the help of MapClient event. When we handler the map client event, then we detected the client point to check if it is in the current adornment layer range. Unfortunately, most of our adornment layer don’t support the GetBoundingBox method by design, So, we have to create the custom adornment layer to fit that.
Here, we created a HyperLinkAdornmentLayer and do an extension on LogoAdornmentlayer. Both of them can be detected by the map client event. Please check the sample and just pick up one of them as your need.
If there is anything we misunderstood, please let us know.
Regards,
Johnny
Post11667.zip (1.5 MB)
Hi Johnny,
That looks like it will work well. Thanks for the help
Steve
Hi Johnny,
That looks like it will work well. Thanks for the help
Steve
Hi Steve,
Good to hear it works.
Any questions don’t hesitate to let us know.
Johnny