PDA

View Full Version : coordinates within geoext



flora-extjs
19 Feb 2016, 1:40 AM
Hi all,
I'm just learning about Extjs4, Geoext2 and OpenLayers2 with the example "MVC simple application example called CF (Cartography Framework)".

There is a feature store which ist bound to an ExtJs Store.
The coordinates of the mountains are shown in geographic coordinates.

The map is defined and loaded in the controller Map.js File.


var wms = new OpenLayers.Layer.WMS(
"OpenStreetMap WMS",
"http://ows.terrestris.de/osm/service?",
{layers: 'OSM-WMS'},
);

Now I want to change the WMS to TMS and


tms = new OpenLayers.Layer.TMS( 'Mountains', "http:..../tms/",
{
type: "png",
serviceVersion:"1.0.0",
isBaseLayer: true,
transitionEffect: "resize",
zoomOffset: 0,
tileOrigin: new OpenLayers.LonLat(-20037508.342789,-20037508.342789),
units:"m",
projection: "EPSG:900913",
opacity: 1.0,
});

If I load the project the mountains were shown on the correct location but the coordinates in the grid where shown in another format/projection?
So I changed projection: "EPSG:900913" to projection: "EPSG:4326", then the mountains are shown on the wrong location.
I have tried a lot with displayProjection .... have red about projection - but I've found no solution.
I want that the geographic coordinates are still shown using TMS.
Please help me to understand. Thanks in advance