AW: [OpenLayers-Users] problem to show geometry-elements
Arnd Wippermann
arnd.wippermann at web.de
Thu Apr 19 16:27:32 EDT 2012
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: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Jan
Tappenbeck
Gesendet: Donnerstag, 19. April 2012 08:29
An: users at openlayers.org
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
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list