[OpenLayers-Users] Transform Vector Layer / Vector Feature
Salvaro
asufsc at gmail.com
Fri Sep 26 07:53:59 EDT 2008
Yes, you are right.
But the gwt-openlayers unhappyly is uncomplete and "stopped", and haven't
some things.
And I've to implement it to can use (for an example I will have to create
the method transform in Geometry, now I just can transform geometry.bounds).
And know how it is in OpenLayers helps me so much.
I'll try this solution, thanks Christopher.
Christopher Schmidt-2 wrote:
>
> On Fri, Sep 26, 2008 at 04:30:16AM -0700, Salvaro wrote:
>>
>> The gwt-openlayers just transforms OpenLayers in Java, but the logic of
>> the
>> solutions usually are the same.
>
> Sure, but the names being different means that an OL Developer probably
> can't tell you the exact things you should be using in GWT.
>
>> Reproject the points in Java or JavaScript have the same idea, Java just
>> use
>> different names to call what is in JS.
>
> yes... and you're looking for the names to call... which is what I can't
> give you...
>
>> And my doubt was just how to change
>> the coordinates of a Vector Feature and how can I do it in OpenLayers.
>
> vectorFeature.geometry.transform(new
> OpenLayers.Projection("EPSG:4326"), new
> OpenLayers.Projection("EPSG:900913"));
>
>> 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.
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>
> --
> 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-tp1115104p1120655.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list