Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread Sven Geggus
Sven Geggus  wrote:

> Jepp. Is there a way to set layer opacity in OL3?

Found the answer myself :)

Opacity can be changed as follows:

layername.setOpacity(x);

With x between 0 and 1.

Done that I am now looking for a way to reload tiles of a given layer.

Sven

-- 
"Das Einzige wovor wir Angst haben müssen ist die Angst selbst"
(Franklin D. Roosevelt)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread Sven Geggus
Mattias Dalkvist  wrote:

> The word you are looking for is opacity [1]

Jepp. Is there a way to set layer opacity in OL3?

Sven

-- 
"Thinking of using NT for your critical apps?
  Isn't there enough suffering in the world?"
   (Advertisement of Sun Microsystems in Wall Street Journal)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread Mattias Dalkvist
The word you are looking for is opacity [1]
Example from mapbox.js (wrapper around leaflet) [2]

Hope that helps.

--
Mattias

[1] http://leafletjs.com/reference.html#tilelayer-setopacity
[2] https://www.mapbox.com/mapbox.js/example/v1.0.0/opacity/

On Fri, Jun 3, 2016 at 11:25 AM, lars lingner 
wrote:

> Hi Sven,
>
> Am 03.06.2016 um 10:29 schrieb Sven Geggus:
> > lars lingner  wrote:
> >
> >> There are examples for OL3  [1] and for Leaflet [2] and [3].
> >
> > This is simular, but not exactly what I'm up to. What I actually want is
> > dissolving layers transparently like in http://sautter.com/map
>
> I see, I wasn't sure about the transparency. I couldn't find an exact
> example. But have a look at [1]. My idea would be to modify one layer
> slider so that it is effecting the transparency of two layers.
>
> >
> > Sven
> >
> > P.S.: Looks like the correct word for "überblenden" is dissolve in this
> case
> > not fade.
> >
>
> Thanks, thats helpful. I ended up searching for the word "swipe" which
> isn't right either.
>
>
> Lars
>
>
> [1]
>
> http://www.acuriousanimal.com/thebookofopenlayers3/chapter02_03_layer_groups.html
>
> ___
> dev mailing list
> dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread lars lingner
Hi Sven,

Am 03.06.2016 um 10:29 schrieb Sven Geggus:
> lars lingner  wrote:
> 
>> There are examples for OL3  [1] and for Leaflet [2] and [3].
> 
> This is simular, but not exactly what I'm up to. What I actually want is
> dissolving layers transparently like in http://sautter.com/map

I see, I wasn't sure about the transparency. I couldn't find an exact
example. But have a look at [1]. My idea would be to modify one layer
slider so that it is effecting the transparency of two layers.

> 
> Sven
> 
> P.S.: Looks like the correct word for "überblenden" is dissolve in this case
> not fade.
> 

Thanks, thats helpful. I ended up searching for the word "swipe" which
isn't right either.


Lars


[1]
http://www.acuriousanimal.com/thebookofopenlayers3/chapter02_03_layer_groups.html

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread Sven Geggus
lars lingner  wrote:

> There are examples for OL3  [1] and for Leaflet [2] and [3].

This is simular, but not exactly what I'm up to. What I actually want is
dissolving layers transparently like in http://sautter.com/map

Sven

P.S.: Looks like the correct word for "überblenden" is dissolve in this case
not fade.

-- 
Freiheit ist immer die Freiheit des Andersdenkenden
(Rosa Luxemburg)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-06-03 Thread lars lingner
Hi,

Am 31.05.2016 um 19:54 schrieb Sven Geggus:
> Hello,
> 
> you probably know http://sautter.com/map/
> 
> This is Openlayers 2 code which uses the concept of Base Layers and
> Overlays thus this map is kind of an abusing this concept.
> 
> I was wondering if there is some sample code for leaflet or Openlayers 3
> which will do something like this.

There are examples for OL3  [1] and for Leaflet [2] and [3].

Hope this helps.

Lars


[1] http://openlayers.org/en/latest/examples/layer-swipe.html

[2] http://spatialhast.github.io/leaflet.swipe.html
[3] https://www.mapbox.com/mapbox.js/example/v1.0.0/swipe-layers/

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[OSM-dev] cross-fade map sample code (ol3 or leaflet)

2016-05-31 Thread Sven Geggus
Hello,

you probably know http://sautter.com/map/

This is Openlayers 2 code which uses the concept of Base Layers and
Overlays thus this map is kind of an abusing this concept.

I was wondering if there is some sample code for leaflet or Openlayers 3
which will do something like this.

I would need this for the development of an openstreetmap-carto fork to have
an easy way to cross-fade between my fork and the original style from
osm.org

Regards

Sven

-- 
"We just typed make"
(Stephen Lambrigh, Director of Server Product Marketing at Informix
  about porting their Database to Linux)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev