[OpenLayers-Users] Transform Vector Layer / Vector Feature

Christopher Schmidt crschmidt at metacarta.com
Fri Sep 26 07:17:26 EDT 2008


On Fri, Sep 26, 2008 at 03:57:25AM -0700, Salvaro wrote:
> 
> 1 - Yes, vector is an array of Feature;
> 2 - I used the method getGeometry() of the lib gwt-openlayers, 

Sigh. gwt-openlayers is *not* OpenLayers: I don't mind people using it,
but *please* at least mention it when you are, since it totally changes 
the entire situation. You're writing Java, not Javascript.

> it just
> returns the attribute geometry (public static native JSObject
> getGeometry(JSObject vector) /*-{
> 		return vector.geometry;
> 	}-*/;), and covert the JSObject into a java object.
> 3 - You are right. And me too when was coding, I typed wrong here, sorry.
> Where you saw "vector[i].getGeometry().getBounds().lon()" I wanted to say
> exactly vector[i].getGeometry().getBounds().getCenterLonLat().lon()
> (getCenterLonLat is the same case of the getGeometry()).
> 
> It wasn't return the LonLat because I forgot to covert a Point JSObject in a
> Point Java Object, now it's getting the rigth coordinates.
> 
> Now I'm trying to find an way to apply the new (converted) coordinates and
> "transform" the vectorLayer.

I suggest contacting the gwt-openlayers list to ask for help.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list