Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Openlayers

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 894 Views
  • scizmeli
    Avatar
    Community Member
    2 Posts

    Openlayers Link to this post

    First of all congratulations for this lovely software. It's the best I came across so far.

    I am very very new to Silverstripe (a few days only). Thanks a lot for your patience with me.

    I would like to display a map using Openlayers within my Silverstripe. I have a static .html page containing the Openlayers code that correctly displays my map.

    My question is : How do I wrap that file so that it all appears as if it is part of Silverstripe?

    I read the documentation but still can not figure out how.

    thanks
    Servet

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Openlayers Link to this post

    You'd use it in a template (.ss) file. See the wiki pages about templating:

    http://doc.silverstripe.org/doku.php?id=templates

    So, for example, you can do:

    <% require javascript(mysite/javascript/openlayers.js %>
    <% require javascript(mysite/javascript/mappage.js %>
    <div id='map'></div>

    where mappage.js is all your openlayers scripts for that page.

  • scizmeli
    Avatar
    Community Member
    2 Posts

    Re: Openlayers Link to this post

    Thanks for the fast reply, Hamish. I will look into that.

    894 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.