|
From: Edwin C. <com...@gm...> - 2010-04-19 07:09:38
|
Hi Hans,
I am not sure about TMS, but in OL I think it has been superseded by
OSM. For OSM you need to include a small javascript library created by
OSM itself.
However, I am not an OSM user, so I can't tell you the details.
The easiest way is to look in a recent OpenLayers example and then see
if you can do sth similar with GWT-OL.
Greetings,
Edwin
2010/4/19 Hans Terje Møller <han...@ho...>:
> Hi.
>
> I wrote you a few days ago, but didn't get a response, so I'm trying again.
>
> I am currently trying to use OSM in gwt-openlayers but have gotten stuck. I
> try importing OSM by creating a TMS layer.
> This is how the code look so far:
>
> TMSOptions tmsOptions = new TMSOptions();
>
> tmsOptions.setFormat("image/png");
>
> tmsOptions.setDisplayOutsideMaxExtent(false);
>
> tmsOptions.setProjection("EPSG:4392");
>
> TMS tmsLayer = new TMS("OpenStreetMaps", "http://tile.openstreetmap.org/",
> tmsOptions);
>
> map.addLayers(new Layer[] {tmsLayer});
>
> This only loads a bunch of red tiles which tells me that the image can't be
> loaded. And when I right click one of those tiles I get this url:
> http://tile.openstreetmap.org/1.0.0/undefined/2/1/1.undefined.
> And the url I need is this: http://tile.openstreetmap.org/2/1/1.png which is
> a working url that I have from another example. From what I understand, I
> haven't managed to define the format, but how do I do this?
>
> I would greatly appreciate some guidelines on how to get OSM working!!
>
> Regards,
> Hans Terje Møller
>
>
>
|