Hi!
Currently I am using Mapstraction with ''openstreetmap'' API.
Everything works fine, I am able to load and display markers
from dynamically created KML file with
mapstraction.addOverlay("url of kml file");
However, OpenStreetMap API just uses Google Maps API
and this one has restricting licensing, so I have decided to
use OpenLayers API.
Now, the same map is displayed, but KML file is not loaded at all.
I have checked the mapstraction.js file and I have found
that the case for ''openlayers'' for addOverlay function is
commented out. Why is that so?
I have removed the comments, but nothing chaged, the map
was still displayed but again without any markers from KML
file.
Than I have replaced existing case
map.addLayer(new OpenLayers.Layer.GeoRSS("GeoRSS Layer", url));
with the following:
map.addLayer(new OpenLayers.Layer.GML("KML", url,
{
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true
}
}));
For this one I am sure that it works since I use the same code in
OpenLayers-only web application.
Unfortunately, this also hasn''t produced any result in Mapstraction.
I still have the map without any markers.
Is it possible that they are perhaps loaded ''under'' the map?
Or I''m missing something else?
Viktor.