This is an old post from my blog
To rotate your text labels do the following (using OpenLayers 2.11):
- Create a CustomSVG.js or modify the existing SVG.js and add the following lines to the Method drawText
{ | |
"version": 8, | |
"sources": { | |
"ne2_shaded": { | |
"maxzoom": 6, | |
"tileSize": 256, | |
"tiles": [ | |
"https://tiles.openfreemap.org/natural_earth/ne2sr/{z}/{x}/{y}.png" | |
], | |
"type": "raster" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Map Panel</title> | |
<!-- ExtJS --> | |
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/include-ext.js"></script> | |
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/options-toolbar.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/example.css" /> | |
<!-- OpenLayers 3 stylesheet --> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css"> |