polfdz / osmbonuspack

Automatically exported from code.google.com/p/osmbonuspack
0 stars 0 forks source link

KML import - different markers / bubble hyperlinks / import from store #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sorry for posting in the Wiki... I jsut read your comment on posting problems 
in the Wiki.
I have no issue but some questions:

I'm using OSMBonusPack 4.2.8 in my project, worked through the tutorials under 
https://code.google.com/p/osmbonuspack/wiki/Tutorial_1 and can successfully 
import and display a KML file from a website.

By default the opjects are imported using the default marker icon. My first 
question would be: how can I assign a specific icons to a certain "Placemark" 
within the KML defined by the "styleUrl" property?

Within the "description" property of the "Placemark" there might be a URL 
included. When clicking the marker, the KML point description is displayed in 
bubble. First, can I edit or format the content to be displayed in the bubble? 
Second, is there a way to search for the URL while parsing and assign it as an 
action to a button within the marker bubble?

And lastly I would like to know how to access the KML file saved in Tutorial 3, 
Step 12 instead of downloading it from a website... 
https://code.google.com/p/osmbonuspack/wiki/Tutorial_3

Thanks,
Tobias

Original issue reported on code.google.com by TobiSc...@gmail.com on 7 Mar 2014 at 12:49

GoogleCodeExporter commented 9 years ago
Hi Tobias, 

1) Well, just follow KML specifications... (refer to the "KML Reference" from 
Google). 
My "Paris Tour" example uses some specific icons, you can have a look to its 
content. 

2) Hum... 
First step would be to implement your own "buildMarkerFromPoint" method. 
Second step is about customizing the bubble to handle URLs. 
Both steps are not straightforward... 

(before starting: note that I just commited a serious restructuring of 
KML-related code, more object-oriented. There is now a KmlPlacemark)

3) Not sure to understand this question. 
In step 12, the KML file is saved locally on your device, not on a web site. 
You can access it with the file manager of your device, or with the DDMS File 
Explorer for AVDs. 
It is stored in the sdcard, in a "kml" directory (/mnt/sdcard/kml/my_route.kml)

You can open it with OSMNavigator (the demo apk), or transfer it to a PC and 
open it with Google Earth for instance. 

Original comment by mathieu....@gmail.com on 7 Mar 2014 at 10:32

GoogleCodeExporter commented 9 years ago
"Within the "description" property of the "Placemark" there might be a URL 
included. When clicking the marker, the KML point description is displayed in 
bubble. First, can I edit or format the content to be displayed in the bubble? 
Second, is there a way to search for the URL while parsing and assign it as an 
action to a button within the marker bubble?"

=> This was an interesting request. 
So with version 4.3 published yesterday, there is now a "Styler" mechanism, to 
perform custom actions during overlays building. Have a look at Tutorial_4, 
§13. 
With your own Styler, you can set-up a custom bubble instead of the default 
one. 

Original comment by mathieu....@gmail.com on 23 Mar 2014 at 6:24

GoogleCodeExporter commented 9 years ago

Original comment by mathieu....@gmail.com on 10 Apr 2014 at 10:21