Hi Guys,
Here's an example of how you might go about adding a KML file to Arches:

Run the following sql statements on the database:

INSERT INTO app_metadata.maplayers(
            active, on_map, selectable, basemap, name_i18n_key,
layergroup_i18n_key, layer)
    VALUES (FALSE,FALSE,FALSE,FALSE,'KML','External_Services','return new
OpenLayers.Layer.Vector(''KML'', {
                projection: new OpenLayers.Projection(''EPSG:4326''),
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url: ''Media/sundials.kml'',
                    format: new OpenLayers.Format.KML({
                        extractStyles: true,
                        extractAttributes: true
                    })
                })
            })');


INSERT INTO app_metadata.i18n(
            key, value, languageid, widgetname)
    VALUES ('KML','KML Sundials','en-us','Arches.widgets.LayerLibrary')


Copy the attached sundials.kml file to the archesproject/arches/Media
folder.

Run archesproject/build/build(.bat/.sh)

Now refresh your browser, go to the MapLayers section on the right, click
the "External Services" button at the top (looks like crossed arrows).
You should see an entry for KML Sundials, and when you show the layer, you
should see the sundial icons popup on the map.

Hope this helps you understand the mechanics of adding external services to
the map.  The key part here is making sure you have a valid Openlayers
layer definition:

return new OpenLayers.Layer.Vector(''KML'', {
                projection: new OpenLayers.Projection(''EPSG:4326''),
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url: ''Media/sundials.kml'',
                    format: new OpenLayers.Format.KML({
                        extractStyles: true,
                        extractAttributes: true
                    })
                })
            })


Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


On Wed, Aug 6, 2014 at 1:09 AM, Alex Proca <[email protected]> wrote:

> I have the same problem. I struggle to add some kml images to arches but
> no success yet. Did you find a solution?
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: sundials.kml
Description: application/vnd.google-earth.kml

Reply via email to