Skip to content

Commit da5e491

Browse files
committed
Merge pull request #361 from chrismayer/update-readme
Adapt README for Version 2.1.x
2 parents d10eaa2 + a072ed2 commit da5e491

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

README.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ the web. It is a JavaScript framework that combines the GIS functionality of
1414
[Sencha](http://www.sencha.com/).
1515

1616
Version 2 of GeoExt is the successor to the
17-
[GeoExt 1.x-series](http://geoext.org) and is built atop the newest official
18-
installments of its base libraries; OpenLayers 2.13.1 and ExtJS 4.2.1.
17+
[GeoExt 1.x-series](http://geoext.org).
18+
19+
GeoExt 2.1.x is built atop OpenLayers 2.13.1 and ExtJS 5.1.0 and provides full backward compatibility to ExtJS 4.2.1.
20+
So GeoExt 2.1 is usable either with ExtJS 5.1 or Ext 4.2.1.
21+
22+
23+
GeoExt 2.0.x is based on OpenLayers 2.13.1 and ExtJS 4.2.1 and is maintained in the [v2.0.x-maintenance Branch](https://github.com/geoext/geoext2/tree/v2.0.x-maintenance).
1924

2025

2126
## More information on GeoExt 2
@@ -39,7 +44,25 @@ already includes ExtJS and OpenLayers:
3944
<!DOCTYPE html>
4045
<html>
4146
<head>
42-
<title>Trying out GeoExt2</title>
47+
<title>Trying out GeoExt2 w/ ExtJS 5.1.0</title>
48+
<!-- Load the ExtJS stylesheet -->
49+
<link rel="stylesheet" type="text/css"
50+
href="http://cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all-debug.css">
51+
<!-- Load ExtJS from their CDN, local versions work also -->
52+
<script type="text/javascript"
53+
src="http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js"></script>
54+
<!-- Load OpenLayers, custom builds may even be better -->
55+
<script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script>
56+
</head>
57+
<body></body>
58+
</html>
59+
```
60+
Or if you are stuck to ExtJS 4.2.x you can use the following code:
61+
```html
62+
<!DOCTYPE html>
63+
<html>
64+
<head>
65+
<title>Trying out GeoExt2 w/ ExtJS 4.2.1</title>
4366
<!-- Load the ExtJS stylesheet -->
4467
<link rel="stylesheet" type="text/css"
4568
href="http://cdn.sencha.com/ext/gpl/4.2.1/resources/css/ext-all.css">
@@ -55,7 +78,19 @@ already includes ExtJS and OpenLayers:
5578

5679
Next, we simply add a `<script>`-tag in which we tell ExtJS about GeoExt (and
5780
also where to find the ExtJS source files):
58-
81+
```html
82+
<script type="text/javascript">
83+
Ext.Loader.setConfig({
84+
enabled: true,
85+
disableCaching: false,
86+
paths: {
87+
GeoExt: "path/to/src/GeoExt",
88+
Ext: "http://cdn.sencha.com/ext/gpl/5.1.0/src"
89+
}
90+
});
91+
</script>
92+
```
93+
Or reference the ExtJS 4.2.1 sources if you have to use them:
5994
```html
6095
<script type="text/javascript">
6196
Ext.Loader.setConfig({
@@ -146,5 +181,3 @@ npm test
146181
```
147182

148183
These tests are also run though [travis](https://travis-ci.org/geoext/geoext2).
149-
150-

0 commit comments

Comments
 (0)