[OpenLayers-Users] Transform Vector Layer / Vector Feature

Salvaro asufsc at gmail.com
Fri Sep 26 06:57:25 EDT 2008


1 - Yes, vector is an array of Feature;
2 - I used the method getGeometry() of the lib gwt-openlayers, 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.

Thanks,
Salvaro.


Christopher Schmidt-2 wrote:
> 
> On Thu, Sep 25, 2008 at 06:02:35AM -0700, Salvaro wrote:
>> 
>> * the best ...
>> 
>> Don't know why vector[i].getGeometry().getBounds().lon() isn't returning
>> anything.
> 
> 1. I don't know what kind of variable 'vector' is. Assuming it's an
>    array of Feature.Vector instances.
> 2. Feature.Vector  instances don't have a getGeometry method. They do 
>    have a geometry property.
> 3. getBounds doesn't have a 'lon' method. It does have a getCenterLonLat
>    method.
> 
> vector[i].geometry.getBounds().getCenterLonLat.lon Would probably be
> what I would write. Can you explain what documentatio led you to believe
> either #2 or #3 were right? 
>  
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Transform-Vector-Layer---Vector-Feature-tp1115104p1120542.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list