[OpenLayers-Users] Transform Vector Layer / Vector Feature

Salvaro asufsc at gmail.com
Fri Sep 26 07:30:16 EDT 2008


The gwt-openlayers just transforms OpenLayers in Java, but the logic of the
solutions usually are the same.
Reproject the points in Java or JavaScript have the same idea, Java just use
different names to call what is in JS. And my doubt was just how to change
the coordinates of a Vector Feature and how can I do it in OpenLayers.

But ok, thanks.


Christopher Schmidt-2 wrote:
> 
> 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
> _______________________________________________
> 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-tp1115104p1120616.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list