-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the map view to not use a javascript approach #5705
Conversation
Using SharpMap to render to a GtkImage
Also fixed property presenter for fine control.
- Added marker icon - Bugfixes - Improved performance (removed unnecessary refreshes)
…to refactor/MapView
The old zoom will no longer make sense to the new mapping widget. Retaining the old coordinates for the center of the map can lead to unexpected results when changing the zoom by itself, so I've changed the center of the map as well. This is a one-time change which will reset all maps back to the default zoom/center locations. (Most of them don't have sensible values anyway).
Any reason not to use BruTile to let us pull in better base maps (e.g., from OpenStreetMap)? |
No particular reason - it's a good idea. The api is pretty powerful and I haven't really explored much of it. I managed to get it working using a simple shapefile for testing and never ended up changing it. |
@hol430 - I had a go at trying to use OpenStreetMap as the source for base maps. As is all too often the case, things didn't work quite as smoothly as hoped. For reasons I don't yet understand, the base maps appear to be retrieved, but aren't rendering. This is complicated somewhat by the version of SharpMap available via NuGet dating back to early 2014, even though the SharpMap code itself has had substantial (and on-going) revision since then. I'm not sure whether the old code never worked quite as intended, or OSM has changed in the intervening years. Here are some options:
Any thoughts about the best direction to take? Why are these things never simple or easy? |
Hi Eric - thanks for looking into this. Agreed that it would be good to improve the current mapping implementation, as it is rather crude. I think I had some similar problems to you when I was getting this working in the netcore3 branch - the version in nuget was really outdated. I ended up compiling the latest source myself, and uploading it to my myget feed. I added this feed to the NuGet.config file on the netcore3 branch. I've used this approach for a couple of other packages which I've had to modify (OxyPlot.GtkSharp3, and, at one point, the gtksourceview package, although this is now available in nuget proper). Depending on which exact revision of sharpmap you need, it may be possible to use a similar approach. I think the version on my myget feed targets .net standard 2.0, so in theory it may work on the main branch (although somehow I doubt it will be that simple :). |
Resolves #5662
Resolves #5241
Relevant to #4381, #4333, maybe others
The new widget uses SharpMap. Generally it's a little more clunky than the old map view but it does work and should be more reliable for autodocs purposes. Panning/zooming with the mouse works ok. I've modified the installers, so that they install the necessary shapefiles. I've also added a converter which resets the center coordinates and zoom level of all map components to default values which make sense for the new map view.