Comments (6)
You could use Navigator.ZoomToBox(viewport.ToExtent())
instead
from mapsui.
There may be something broken with the Busy state. What if you just wait for two seconds?
from mapsui.
Tried adding 10 second delay but no change.
However I had a brain wave and added a random Height = 1000:
//Create viewport to match GPX list
var viewport = new Viewport()
{
Width = MainActivity.mContext.Resources.DisplayMetrics.WidthPixels,
Height = 1000
};
A full width image is now created. This was not needed on 3.x? Or I was just lucky on 3.x?
from mapsui.
Yes, the Width and Height need to be set. Something probably changed in the defaults. The Viewport was entirely rewritten in v4.
I tried to not set the Height in a unit test and I get an exception, so that may also have happened within your code. Make sure to attach to the Mapsui logger https://mapsui.com/documentation/logging.html.
Perhaps the Navigator.SetViewport method should be made private because it also sets the Width and Height which should not be controlled by the user but only by the MapControl.
from mapsui.
Thanks for the info! This one can probably be closed as its "just" changed behaviour between 3.x and 4.x and it somehow is working. Will probably break in 5.x when you make the method private, but that's a future bridge to cross.
I'll add logging to my project, thanks for the link, I had missed that one.
from mapsui.
Hm... Its not a drop-inn replacement. As long as I use this, it works:
Fragment_map.mapControl?.Map.Navigator.SetViewport(viewport);
I either get a square that does not have any of my gpx route, or just the narrow strip, missing left and right of the route when using viewport.ToExtend(). Will need more investigating to see what is going on here.
from mapsui.
Related Issues (20)
- Map.Info eventargs return null for args.MapInfo.Feature when clicking on feature. HOT 3
- Removing items in ObservableCollection doesn't affect _shadowCollection HOT 1
- Dont cache BaseOnSourceLayers which use WritableLayers as their SourceLayer HOT 5
- Map Binding in WPF HOT 1
- Shapefiles and mbtiles in .NET MAUI (Android) HOT 3
- Mapsui Maui not working in ios 17.5 HOT 7
- Confusion with WMTS (blank map) #question #helpneeded HOT 5
- MAUI: Double click on map HOT 3
- Memory Leak HOT 10
- [Question/Feature Request] Is there a way to distinguish ViewportChanged events between "manual" and "programmatical" ? HOT 3
- Pinch zoom causes map to pan even with PanLock on HOT 4
- PanLock prevents programmatic moving of the map HOT 2
- WPF: Zoom is laggy after MapControl is re-created HOT 4
- RasterizingLayer performance and display HOT 18
- Let Map be Disposable but not the MapControl
- WPF: Shape layer performance issue HOT 2
- Blazor map control crashes when AOT compiled HOT 8
- System.Text.Json has a vulnerability in version 8.0.3 HOT 3
- Country reappears after it gets back into the viewport
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsui.