Use this to convert your 4326 result to 900913
OpenLayers.Layer.SphericalMercator.forwardMercator

Diego Guidi


On Thu, Jul 3, 2008 at 14:07, David Martinez Morata <[EMAIL PROTECTED]> wrote:
> Hello.
> I have a problem with geocoding.
>
> I have a function to do it, but the problem its the result. I geocode and
> the result it's in EPSG:4326 projection but mi map it's in EPSG:900913. I
> try to put the transform function of OpenLayers.LonLat object but I'm doing
> somthing wrong.
> My function it's:
>
>
>  function showAddress(address) {
>        var geocoder = new GClientGeocoder();
>      if (geocoder) {
>        geocoder.getLatLng(
>          address,
>          function(point) {
>            if (!point) {alert(address + " not found");}
>            else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15)}
>          }
>        );
>         }
>     }
>
> Anyone can help me?
>
> Thanks
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to