I have a WFS layer:
myVecLayer_disp= new OpenLayers.Layer.Vector("Редактируемый участок",{projection: new OpenLayers.Projection("EPSG:900913")});
And i have feature store:
var protocol=new OpenLayers.Protocol.HTTP({
url: url_servlet+"fullSearch.jsp",
format: new OpenLayers.Format.GeoJSON({internalProjection: new OpenLayers.Projection("EPSG:4326"),externalProjection:new OpenLayers.Projection("EPSG:900913")})
});
searchStore = new GeoExt.data.FeatureStore({
layer: myVecLayer_disp,
fields: [
{name: 'id', type: 'String'},
{name: 'name_dispatcher', type: 'String'},
{name: 'voltage', type: 'String'},
],
proxy: new GeoExt.data.ProtocolProxy({
protocol: protocol,
}),
autoLoad: true,
layerOptions: function() {
return {
strategies: [new OpenLayers.Strategy.BBOX()],
//projection:"EPSG:4326"
};
}
});
As you see i use GeoJSON. In this geojson i have features in wgs84. And reproject it in mercator in protocol. Now i show this layer:
app.mapPanel.map.addLayers(myVecLayer_disp);
myVecLayer_disp.visibility=true;
And see features near Africa but expect to see it within Russia. So Nothig reproject i think. But when i see layes's features:
LINESTRING(0.00055807640304122 0.00050642147755534,0.00055807616948463
0.00050641930362077,0.00055807588202664 0.00050641664462617,0.00055807423809849
0.00050641332981391,0.00055807306129967 0.00050640979946183,0.00055807191147579
0.00050640644872202,0.00055807052802261 0.00050640231648177,0.00055806910873212
0.00050639813934481,0.00055806841697321 0.00050639609116937,0.00055806763547558
0.00050639388128181)
Ant this is same feature in geojson:
{"type":"LineString","coordinates":[[62.124781001642077,56.374581001212391],
[62.124755002241727,56.374338999945053],[62.124723002564679,56.374043002482722],
[62.124540001320156,56.373673997157425],[62.12440900067503,56.373281000617851],
[62.124281002866155,56.37290799870533],[62.124126997563053,56.372447999975407],
[62.123969002867341,56.371983002813522],[62.123891996618511,56.371755002191776],
[62.123805000700372,56.371508997142655]]}
What i doing wrong?