Closed GoogleCodeExporter closed 9 years ago
Just a first comment: for POIs created from NominatimPoiProvider, the "more
info" button is useless, as there is no URL attached to such POIs...
Now, if you get Wikipedia POIs with GeoNames, effectively, your strategy will
not work.
Going from POIs to Overlays, then to KML, is simple, but cannot ensure to keep
all POIs information, and the behaviour you implemented with your
custominfowindow.
So, how should you proceed?
If you want to export your POI info in a KML file, I suggest that you build
your KML content yourself directly from the POI array (not from Overlays).
Basically, you create an empty KmlDocument, construct a KmlPlacemark for each
POI, and put them in the KmlDocument.mKmlRoot. Then save the KmlDocument.
And now, for POI loading:
Load your KML file with a KmlDocument.
Then, to have your custom InfoWindow with the "more info" button:
Upgrade to OSMBonusPack v4.3.
Then use the Styler (see Tutorial_4, "Advanced styling with the Styler"):
Implement onPoint, so that for each POI Marker you can set your custom
InfoWindow.
Original comment by mathieu....@gmail.com
on 1 Apr 2014 at 4:59
Thanks for the reply.
In my application I want a brief description to appear when I click on the POI
custominfowindow, while the click on the "more_info_button" opens an activity
with a more detailed description.
I'm going to implement the changes you suggested and I'll let you know. Another
question: would it be possible to create a "custom provider POI" using a
webservice to download a kml (or Json) file with the POI to be displayed?
thank you very much
Original comment by giovanni...@gmail.com
on 2 Apr 2014 at 8:41
would it be possible to create a "custom provider POI" using a webservice to
download a kml (or Json) file with the POI to be displayed?
=> Yes, of course you can do that.
You can also use the OSMBonusPack KmlDocument parser to load this KML file, and
then create POIs from the KmlPlacemark objects.
Original comment by mathieu....@gmail.com
on 2 Apr 2014 at 10:48
Hi,
I implemented the changes you suggested (screenshot 1 & 2) but, if I click on a
marker I get a ClassCastException when casting the item in onOpen() method in
customInfoWindow class.
How should I proceed to get a POI item in onOpen() method? Or how should I do
to obtain a POI object from a KmlPoint object?
Thanks,
Giovanni
P.S: I attached some screenshots to better explain the problem..
Original comment by giovanni...@gmail.com
on 3 Apr 2014 at 4:16
Attachments:
Closed, as it neither a bug, not a feature request.
Requests for help about implementating can be raised in StackOverflow (with
osmdroid tag).
Original comment by mathieu....@gmail.com
on 25 Jul 2014 at 3:41
Original issue reported on code.google.com by
giovanni...@gmail.com
on 31 Mar 2014 at 4:59