hi, i have a google map that shows kml polygons on it by clicking the apropriate checkbox. I would prefer to have openstreetmap as the main map instead of google but cannot find a solution to this, I know how to show the osm map but do not know how to show the kml files in exactly the same way as the google map. Google Map test http://gmdesign.org.uk/maptest/1 OSM Map Test http://gmdesign.org.uk/maptest/2 Can you suggest or fix it so the osm map shows the kml files on it in the same was as the google one does. OSM has an option to show kml but that is by a slide in sidebar at top right of screen but this is not what i am after, am after the checkbox style same as google map. the scripts are files are on the links above I did see a similar osm checkbox but as its in .asp i cannot view the sourcecode. http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group_wfs.html asked 13 Jan '15, 23:34 mini_egg aseerel4c26 ♦ |
There are many different libraries you can use. Using leaflet for example, follow the quickstart and layer group tutorials, to get you started, and use one of the existing plugins to load the KML. answered 14 Jan '15, 10:15 Vincent de P... ♦ i have looked but nothing does what i am looking for and the site that does similar to what i am after is an asp and source code cannot be looked at
(14 Jan '15, 21:27)
mini_egg
|
So it seems that you are using OpenLayers, where recent version is 3.1.1 in these days. I found some examples when browsing to http://openlayers.org/ -> Examples ... and the doing a text search in my browser for "KML", "layer", "switch" or similar. Is there really NO example that comes near your aim? And tell us the closed source ASP based website you mentioned ... maybe we can help you even better then. answered 15 Jan '15, 18:42 stephan75 I gave the link with the asp. Click on this link and look at the source code you will see some of the code is linked to a asp page, as all the kml files are not shown so they ar4e obviously hidden in the asp file. http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group_wfs.html
(16 Jan '15, 00:24)
mini_egg
I cannot find any exaple that does exactly what i am after, i am looking for exactly the same style as the google example where checkboxes are shown below the map and ticked to highlight polygons. I am wanting the person to specificially choose which polygon to view. the openlayer examples have kml show on a map like the earthquakes but it does not allow you to switch on or off them
(16 Jan '15, 00:25)
mini_egg
Hmm ... I am no expert in OpenLayers or Leaflet ... So what about asking your concrete aim at the googlecode mailinglist forums of both projects? I am sure that there are some experts who can help you.
(16 Jan '15, 18:45)
stephan75
|
You didn't say which map library you were using, and the gmdesign.org pages currently say "offline".
my web links are working try again, maybe you just caught an outage