Flash shape (proof of concept) by sindizzy · Pull Request #1488 · DotSpatial/DotSpatial · GitHub
Skip to content

Flash shape (proof of concept)#1488

Open
sindizzy wants to merge 5 commits into
DotSpatial:masterfrom
sindizzy:Perez-FlashShapeExample
Open

Flash shape (proof of concept)#1488
sindizzy wants to merge 5 commits into
DotSpatial:masterfrom
sindizzy:Perez-FlashShapeExample

Conversation

@sindizzy

@sindizzy sindizzy commented Jan 8, 2023

Copy link
Copy Markdown
Contributor

This new feature will "flash" a shape. Many times, as a GIS user, I want to know where a certain feature is located without zooming. This new function will draw crosshairs to the feature and "flash' it by alternating the fill color between red and green. Screen capture here

(I also made some very small changes to DemoGPS since it was stopping the entire Examples solution from comiling)

Checklist

  • I have included examples or tests
  • I have updated the change log
  • I am listed in the CONTRIBUTORS file
  • I have cleaned up the commit history (use rebase and squash)

Changes proposed in this pull request:

  • Added this function as a new project in the Examples folder as a proof of concept.
  • I would like to add this as a context menu or button in the TableEditor control. I did research that approach and tried to mimic the ZoomToSelected method but realized soon that there were many events and triggers that I would have to tweak and am just not familiar enough to successfully add it this way.
  • If someone were to point me to where this function should be located and what things I would have to change then I can code that up.
  • Maybe this is better implemented as a tool???

Main logic and code
The FlashShape function overload was merged into one routine

In the compile of the Examples solution resulted in an exception for DemoGPS project: Error CS0579 Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute'.
To fix this two things were done under the project folder:
\Source\Examples\DemoGPS\
- C# (deleted this folder. looks like some remnants of the update to Core)
- c#.backup (excluded from the project tree. looks like this was the culprit as I think it was being rolled into the compilation).

Reference: https://stackoverflow.com/questions/61997928/errorcs0579duplicate-globalsystem-runtime-versioning-targetframeworkattribu
"Previously (VS 2019 and before) the project files listed all of the files that would be compiled. In VS 2022, all files in the project folder will be compiled unless they are specifically excluded in the project file."
Added a sample where the user can provide the shape index to flash.
update to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant