Challenge Ulamspiral The challenge

Get familiar with the Ulam spiral:

The aim is to print the spiral like in the picture above!

Rules

Write a function ulam(n)

where n is a odd positive integer and describes the size of the grid to print.

All non-primes numbers should be replaced with | horizontal and - vertical as in the picture above following the spiral. (Corner elements belongs to the vertical)

All numbers need to take the same amount of space visually and smaller numbers are right centered vertically:


1000
 100
  10


10 needs two spaces on the left and 100 needs one space left.
This property depends on the biggest number you have to calculate.

Example: (n=3)

 -  - 3 
|     |  
7   - 2  
|        
 -  -  


The test for primes/sieve you have to write yourself.

Smallest byte code wins.

Bonus
- 25 if you can make it more pretty find some symbols so that - and | takes the same space (-25 more if you can find a pretty corner symbol) and the symbol should show the line where the spiral evolves.
Python 3 - 506 479 bytes

q=range
def p(n):
 for d in q(2,n//2+1):
  if n%d==0:return 0
 return 1
w=int(input());m=w**2;z=len(str(m))
def k(n):
 if n==1:return'-'*(z-1)+'&gt;'
 if p(n):return str(n).zfill(z)
 return'.'*z
l=[k(n+1)for n in q(m)];s=[[0for n in q(w)]for n in q(w)];x=y=w//2;t=[n//2for n in q(2,w*w)];c=[[1,0],[0,-1],[-1,0],[0,1]];j=p=0
for r in t:
 d=c[p%4];p+=1;i=0
 while i&lt;r and j&lt;m:
  s[y][x]=l[j]+' ';x+=d[0];y+=d[1];i+=1;j+=1
s=[''.join(l)for l in s]
for l in s:print(l)


I am not sure if the byte count is correct.
Also, this can most likely be made shorter (I'm new to Python).

Right now I'm just substituting all non-primes with periods. You can change this to any character.

Note: You should only enter odd numbers as input, as otherwise the program breaks.

Furthermore, my function to determine whether a number is prime is the most primitive it can be, for the sake of less characters, so it is not efficient. Though it ran just fine on my computer with input values less than 100 in just under a second.

Note: Input values above 25 or 30 won't display correctly unless you have a ridiculously wide screen.