You should search your circle at 0,0.
Your circle have to be in projection "EPSG:900913".
And your parameters should be lon, lat, ... instead of lat, lon.
function createCircle(lon,lat,radiusKM)
{
var lonLat = new OpenLayers.LonLat(lon, lat).transform(new
OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:900913"));
...
}
And why do you zoom twice to the selected location
function go2mark(lat, lon, zoom) {
var lonLat = new OpenLayers.LonLat(lon, lat).transform(new
OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:900913"));
map.setCenter (lonLat, zoom); //first time
createCircle(lon, lat, 0.001);
jumpTo(lon, lat, zoom); //second time?
}
Gruß
Arnd
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Jan
Tappenbeck
Gesendet: Donnerstag, 19. April 2012 08:29
An: [email protected]
Betreff: [OpenLayers-Users] problem to show geometry-elements
hi !
i want to create a allotment-map with search-function (combobox ->
parecellen)
when you select a parcel-number the function
go2mark zoom to the field and by
createCircle a circel should be mark the area.
but nothing will show. can anyone help ?
here the url: http://osm.tappenbeck.net/sandbox/schrebergarten/deu/index.htm
reagards Jan :-)
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users