Comments (3)
Hello Tomas,
Can you post relevant code of what you want to achieve and proposition for API
change?
I wouldn't want this lib API to drift too far away from the original library.
Some control questions:
How many markers do you want to add this way?
Are you using clustering with addMarkersDynamically set to true?
Original comment by [email protected]
on 10 Apr 2013 at 7:25
- Changed state: NeedsMoreInfo
from android-maps-extensions.
It was only idea. I have about 5000 markers on the map and I'm using
addMarkersDynamically. Now I make DB query in the background thread and them
already on the UI thread iterate over all rows in the cursor add call
addMarker(). It is relatively fast. I only think that maybe should be faster if
will be possible call addMarker() also from background thread. But it require
some additional method which must be called after all markers will be added to
propagate changes to the map. Now it crash by ConcurrentModificationException.
I have also thought about the possibility to not load (from DB) all markers but
only for square region around displayed area. But I don't know how to do it
fast. Clear all markers after every move it is relatively slow. If I will only
add new ones after every move it will make duplicates or it is handled?
Original comment by [email protected]
on 12 Apr 2013 at 8:46
from android-maps-extensions.
The code is made to not call the original library unless necessary. So when you
add 5000 markers, only a dozen or so are really created in the end.
I have just checked with LaunchTimeTestActivity available in demo project. For
5000 markers with clustering and dynamic addition enabled it takes 180ms
This might be an issue of course, but I don't think adding synchronization to
allow multiple threads access would decrease that.
One thing I can suggest is to add markers in packets using Handler. Take this
as an example:
https://github.com/mg6maciej/android-maps-v2-demo/blob/master/NewMapsDemo/src/pl
/mg6/newmaps/demo/AddMarkersInBackgroundExampleActivity.java
If you don't add all the markers, you can get some improvements, but you need
to be careful not to add same marker twice.
Original comment by [email protected]
on 12 Apr 2013 at 8:10
- Changed state: Invalid
from android-maps-extensions.
Related Issues (20)
- Markers with the same position always appear clustered HOT 3
- IndexOutOfBoundsException om markers remove HOT 1
- Markers are not visible. HOT 7
- cannot use snapshot() method ,how to do screenshot on googlemap v2 HOT 3
- Crashes LazyMarker.java HOT 1
- Crashes LazyMarker.java HOT 8
- Map is unresponsive after adding a lot of markers until suspend/resume HOT 2
- Cluster ClusterMarker if they are very close together HOT 1
- GoogleMap.onMapLoadedCallback() HOT 6
- Swtich to android support library v13 HOT 3
- Extend MapFragment HOT 3
- Restructure project HOT 4
- Inhibit clustering of marker HOT 1
- NPE in calculateDistanceBetweenMarkers() HOT 2
- Draw text on markers in onCameraChange HOT 3
- Make this library work with the Google Maps for Business SDK HOT 1
- IllegalArgumentException when try to execute marker.setIcon in the onMarkerClick callback HOT 12
- getMarkers() getting different results HOT 1
- Google maps extensions does not find fragment R.id.map
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 android-maps-extensions.