Hi, first of all many thanks for the great work on this library. I'm about to use it for a hiking map, which should also deliver additional information on some landmarks.(i.e. some summits, which can be found in the openstreetmap source I'm using) In my current application, the maps displays the summits as icon, as defined in the rendertheme. Everything works fine ;-)
I like to make the representation of these summit (i.e. the icons, as shown on the map) 'clickable', but I'm wondering how to achieve that?
Of course, one could create many TappableMarkers, but:
I’m using the SVG-rendertheme and I think about the nice way to attach a ‘onClick’ listener to an SVG element on a HTML page. ;-)
Thanks in Advance for any answer & best regards,
Martin
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/547EBD95.80503%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/17808399-15e4-42ae-8261-9fb25a707790%40googlegroups.com.
As I said, best would be an example for the Samples app.Ludwig
So,
here are my files, I extended the 'DummyContent' Class to create more
'DummyItems', which are queried from from
http://nominatim.openstreetmap.org.
This is inspired by https://code.google.com/p/osmbonuspack/wiki/Tutorial_2
but I use a XML Parser, thus I needed to add an additional XML parser class.
The item list is posted to the BubbleOverlay and represented as marker there. I think it should work without problem.
The next step would be to cluster the items, I have looked through the internet and found some advice on doing that:
https://arnaldog.wordpress.com/2013/07/31/simple-clustering-with-android-maps-v2/ (I hadn't much time to look into that, but seems to be pretty straightforward..)
http://stackoverflow.com/questions/10410217/cluster-marker-openstreetmap-java (see the link in the answer there)
http://code.google.com/p/osmbonuspack/wiki/Tutorial_3 (also includes sample code)
I hope I can get deeper into that later...
Regards, Martin
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/9d8477ca-9ac1-4e85-9f1f-bf7ba0344d91%40googlegroups.com.
| package org.mapsforge.applications.android.samples.markerclusterer; .... public class ClusterMarker extends Layer { |
| public boolean onTap(LatLong geoPoint, Point viewPosition, Point tapPoint) { |
--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/5491D673.1040009%40gmail.com.
Thanks for the quick answers, & now I got it: simply overriding "getPosition" solved the problem. So, why is it not abstract in the layer class?
Shortly answer your questions:
- I have not extending 'Marker', because it's variables are 'private' - could they be 'protected'? Additionally, I'm defining the Clustermarker without knowing it's position, bitmap aso. Thus, I would like to have an empty super constructor.
- The algorithm is not very elaborated: It is a grid-based algorithm, but the grid is placed around it's first element. From a not clustered element a Cluster is created and all elements closer in X- or Y-axis to this first element are added to the cluster.
Best Regards, Martin
Thanks for the quick answers, & now I got it: simply overriding "getPosition" solved the problem. So, why is it not abstract in the layer class?
Shortly answer your questions:
- I have not extending 'Marker', because it's variables are 'private' - could they be 'protected'? Additionally, I'm defining the Clustermarker without knowing it's position, bitmap aso. Thus, I would like to have an empty super constructor.
Could possibly be, not everything is perfect.
Thanks for the quick answers, & now I got it: simply overriding "getPosition" solved the problem. So, why is it not abstract in the layer class?
- I have not extending 'Marker', because it's variables are 'private' - could they be 'protected'? Additionally, I'm defining the Clustermarker without knowing it's position, bitmap aso. Thus, I would like to have an empty super constructor.