Comments (4)
I have also this issue in here map ios SDK.
Please check my this screenshot (this is device memory usage, not a simulator),
from here-ios-sdk-examples.
Finally, I found the solution for Crazy memory consumption
I am using 3 maps (HereMap) screen in my application and this solution works for me and Release memory around 100MB.
You need to init your map in viewDidAppear and remove your map in viewDidDisappear.
I am using 3 maps in my application and init view in
https://stackoverflow.com/questions/47043275/memory-pressure-with-here-maps-ios
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
dispatch_async(dispatch_get_main_queue(), ^{
if (self->mapView == nil) {
self->mapView = [[NMAMapView alloc] initWithFrame:self.view.frame];
[self.view addSubview:self->mapView];
[self.view sendSubviewToBack:self->mapView];
}
[self mapSetup];
});
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self removeMemoryForMapView];
}
-(void)removeMemoryForMapView {
mapView.positionIndicator.visible = false;
mapView.landmarksVisible = false;
mapView.delegate = nil;
mapView.gestureDelegate = nil;
mapView.safetySpotsVisible = false;
[mapView setVisibility:false forPoiCategory:NMAMapPoiCategoryAll];
[mapView removeFromSuperview];
mapView = nil;
}
from here-ios-sdk-examples.
Each instance of the map will incur more memory usage. However, sharing a map instance across multiple views is possible and something you should consider if the map configuration isn't too different across the various views. If they differ a lot (or if you are displaying traffic which should really only be displayed on one map view at a time to have a reliable display), then making the multiple map instances is the way to go. It's a matter of balance between convenience and memory usage.
On an aside, please post questions at our Stack Overflow forum where the HERE SDK user community and our SDK developers can help you.
from here-ios-sdk-examples.
@AmbroseLi Hi Ambrose, I have already posted this on Stack Overflow. But I was not able to post it on this page or under this tag. I could only find a tag named here-api on Stack Overflow. Can you help me adding this question to your page.
Below is the link of my post on Stack Overflow.
[https://stackoverflow.com/questions/47043275/memory-pressure-with-here-maps-ios]
Nature of my app is like this that having one single instance of map might not be possible. App has a tabbar and 3 of my tabs show map simultaneously.
Another bigger issues is that each time frame of map is changed, it reloads and memory keeps on increasing like any thing. Even moving the map and zoom in/ zoom out will also increase memory exponentially.
50 MB of memory on one load. Isn't it crazy.
Any help will be highly appreciated.
from here-ios-sdk-examples.
Related Issues (20)
- Alternative Route Find HOT 2
- How to Visible marker image set ? HOT 1
- When we are not in map screen voice instruction come but not call delegate method hasCurrentManeuver [issue on foreground mode ] HOT 6
- On Marker click i want to show bubble info HOT 1
- How to get Total travel in Highways/Local/Interstate HOT 1
- can we apply the heremap for a specific country? HOT 3
- Example code for NMAMapDataPrefetcher HOT 5
- Issue to change style of water areas HOT 1
- Crashes on SwiftUI previews iOS 14.5 HOT 2
- Drift issue HOT 3
- Missing support for Xcode 13 HOT 1
- elapsedDistance HOT 2
- Overlay move with turn by turn navigation issue HOT 4
- How i add array in dynamic manner NMAWAYPOINT and NMAGeoCoordinates *start/end. HOT 9
- SPM support for HEREMaps library? HOT 1
- How i find Road type Interstate, Local and Highway ? HOT 2
- Can't add accessibility identifier for HereMapSDK elements in UI Testing HOT 1
- Crash problem HOT 2
- Calculate distance between points on route
- SwiftUI HOT 1
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 here-ios-sdk-examples.