Closed FogiaFr closed 9 years ago
Thanks, interesting idea.
Can you say a bit more about why you need this, or how you are using it? (Not so much about the implementation, but on your intended usage). For now, we see the MultiMarker simply as a composite.
I am developping a game that used a Map (the World Map) and the map is divided in provinces. Some provinces are MultiPolygon (for example, Scotland and the nearby islands or provinces that are in the 'normal' map and in zoom focus map). And since I use my markers (I extends the Marker class but I need a custom class to handle some events like drag and drop of counters for example), I need to have an implementation for MultiMarker.
Thanks @FogiaFr for the suggestion. See MultiMarkerTestApp.java for an example, as I implemented it a bit simpler than in your implementation. Let me know if that is not sufficient.
In the MarkerFactory, SimplePointMarker, SimpleLineMarker and SimplePolygonMarker can be overwritten with the setXXXClass but the MultiMarker can't.
A possible way to do this can be found there: https://github.com/FogiaFr/eu/blob/master/front/eu-front-client/src/main/java/com/mkl/eu/front/client/map/marker/MarkerFactory.java The changes are: