OS OpenSpace [logo]

OS OpenSpace Forum » OS OpenSpace » OpenSpace Forum

Thread: Initialising

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Pages: 1 - Last Post: 19-Mar-2012 10:56 by: tonydunlop Threads: [ Previous | Next ]
harryray

Posts: 2
Registered: 29/02/12
Initialising
Posted: 07-Mar-2012 18:33
  Click to reply to this thread Reply

I'm not a web programmer but am in charge of our parish website and am trying to display map at http://www.pyonsgroup.co.uk/?page_id=1243

I have downloaded the openspace plug in in wordpress and it is active and i have settings under 'settings/openspace maps'. I have done the mapbuilder and copied the code and pasted it into the page (under html) and all that comes up is an empty box. I have registered the api key. I can't think of anything else to do.

Can anyone help?

Thanks

Harry

tonydunlop

Posts: 158
Registered: 16/05/09
Re: Initialising
Posted: 08-Mar-2012 08:50   in response to: harryray
  Click to reply to this thread Reply

Hi Harry,
You have an API key, but looking at the page source for your map page I see that you haven't inserted it in the javascript code which has this line:

<script type="text/javascript" src="http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=insert_your_api_key_here"></script>

Tony

alee

Posts: 7
Registered: 17/11/10
Re: Initialising
Posted: 08-Mar-2012 10:04   in response to: tonydunlop
  Click to reply to this thread Reply

There are some instructions on the plugin page http://wordpress.org/extend/plugins/os-openspace-maps/installation/

Sounds like you need to do step 4 and paste the API key in to the settings page. Shouldn't need to go editing files.

harryray

Posts: 2
Registered: 29/02/12
Re: Initialising
Posted: 18-Mar-2012 14:01   in response to: tonydunlop
  Click to reply to this thread Reply

Hi. Thanks for responding. I have tried this but is still showing an empty box. If you look at the page source now does that look better? Also, I don't seem to have an Openspace settings option to enter my API unless I activate the 'OS Openspace maps' plugin by Jon Lynch but I think this is not necessary or compatible with using map-builder. I have also uploaded this video http://www.youtube.com/watch?v=95QnRbbwcJ0&feature=g-upl&context=G208b837AUAAAAAAAAAA

tonydunlop

Posts: 158
Registered: 16/05/09
Re: Initialising
Posted: 19-Mar-2012 10:56   in response to: harryray
  Click to reply to this thread Reply

The page source is still invalid: the web map-builder output has been included within html paragraph tags inside the existing html <body>. This results in nested <html> <head> and <body> tags, and these inner ones are most likely ignored, so the code to render the map is never executed.

I am not a WordPress user, but I can see from what you have ended up with that the plugin route is probably the better one!

Tony

Legend
Expert: 51 - 1000 pts
Advanced: 31 - 50 pts
Intermediate: 16 - 30 pts
Novice: 5 - 15 pts
Newbie: 0 - 4 pts
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums