Ti.MarkerManager is a library for Appcelerator Titanium for realizing to display a lot of annotations on map.
This repo supports the meetup of Hamburg Titanium Group.
First you add de.appwerft.markermanager in your tiapp.xml.
Now you open a terminal window in your project and
gittio install -g
It will install all missing modules and widgets required by your tiapp.xml and app/config.json files. In our case it will install de.appwerft.markermanager
If gittio is missing in your system:
sudo npm install -g gittio
If npm is missing you download it from here.
Now you can use it:
var MarkerMananger = require('de.appwerft.markermanager');
var Overlay = new MarkerManager({
image : '/images/car2go.png',
maxannotations : 200,
points : [{lat:53.23,lng:10,title:'Title',subtitle:'SubTitle'},{}],
map : mapview // reference to mapview
});
Overlay.addEventListener('start',function(){
// do something like showing spinner
});
Overlay.addEventListener('complete',function(){
// do something like hiding spinner
});
Overlay.destroy();
See at app.js for more details. Currently you can only staticly display annotations.
TODO: dynamic managing of markers (new and obsolete markers, position changing)