You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2014-12-28 21:25:22

a01020304
Member
Registered: 2014-12-28
Posts: 2

How can I Show KML with checkboxes?

I posted this earlier but someone deleted it, have no idea why?

I have created a google map that shows kml overlays by clicking on a check box. You can see it here: http://gmdesign.org.uk/testscripts2/test.htm

I would like to use OSM instead of google and have the same format.
How can I change the map to OSM and still have the check boxes

I would be grateful for any assiatance or point me in right direction.

Offline

#2 2014-12-29 14:35:02

stephan75
Member
Registered: 2008-05-28
Posts: 2,918

Re: How can I Show KML with checkboxes?

Firstly I recommend to get familiar with the two mostly used (at least in OSM universe)  web frameworks to display map tiles, namely

http://openlayers.org
and
http://leafletjs.com

Both websites have a bunch ov examples / plugins with many feature examples.

Tr yone of them or both by displaying a KML file ... I think that should be possible (have not done on my own).

Then switching on /off that overlay shoud be easy.

Offline

#3 2015-02-05 04:17:40

TorhamZed
Member
Registered: 2012-10-26
Posts: 6

Re: How can I Show KML with checkboxes?

Your web page seems to be offline at this time.  Embedding into a web page is not your only option.

I built an add-in to a program built for KDE, called Marble, which is heavily reliant upon check boxes in order to display only certain chosen points of interest. (or all POIs, if chosen)

The file which links up all of your KML files inside of Marble is called a DGML file, you can use my DGML file as a template if it will help.  KDE Marble comes standard with an OpenStreetMap layer, which is what I built on top of.

https://marble.kde.org/

http://sourceforge.net/projects/truckstoplinux/files/

If I can offer some tips, feel free to ask.  Additional information:

https://techbase.kde.org/Projects/Marbl … LoadingKML

800px-LoadKML.png

Offline

Board footer

Powered by FluxBB