Sep 1
 Önder ALTINTAŞ
Thank you for your Great help.   Your modification is perfect..

On Thursday, September 1, 2016 at 3:34:57 AM UTC-5, Önder ALTINTAŞ wrote:
>
> Actually it is a bit more design issue than ol3js problem. Some of the 
> tiles are having 9mb of data size when you get them as vector. Instead 
> there might be some intelligent solutions not to load too much data to the 
> client. There might be some solutions:
> 1- Show the data as wms layer. Picture tiles take less data size. When 
> user needs to interact with feature, you can use "getfeature" of wfs and 
> load only 1 or required features to the client.
> 2- You can show wms until some zoom level and show wfs after that level if 
> you require all the data to be there. (check attached file from your 
> example) 
>
> 31 Ağustos 2016 Çarşamba 17:33:15 UTC+3 tarihinde Hamadtou Hassan yazdı:
>>
>> Önder ALTINTAŞ,  
>> Thank you  for the hints,  none of the solutions worked for me still same 
>> performance.  Can you test it please with my WFS url at your end..
>> as a temporary solution,  setting the minResolution & maxResolution  this 
>> is working for me so far:
>>
>>  var serverVector = new ol.layer.Vector({
>>         source: vectorSource,
>>  minResolution: 0,  
>>     maxResolution: 4,
>>         style: vectorStyle
>>       });
>>
>>
>>
>>
>>
>>
>> On Wednesday, August 31, 2016 at 2:42:25 AM UTC-5, Önder ALTINTAŞ wrote:
>>>
>>> Hello, you can solve the issue with 2 ways
>>>
>>> 1- Using ol.layer.Image and ol.source.ImageVector and giving your ol.
>>> source.Vector to ol.source.ImageVector.
>>> This way rendering performance can be increased dramatically. I guess 
>>> this one is what you are asking for. See the example, use 
>>> Example code:
>>>   var imageVectorSource = new ol.source.ImageVector({
>>>     source: vectorSource,
>>>     style: new ol.style.Style({
>>>       fill: new ol.style.Fill({
>>>         color: 'rgba(255, 255, 255, 0.6)'
>>>       }),
>>>       stroke: new ol.style.Stroke({
>>>         color: '#319FD3',
>>>         width: 1
>>>       })
>>>     })
>>>   })
>>>
>>>   var imageLayer = new ol.layer.Image({
>>>     source: imageVectorSource
>>>   })
>>>
>>>
>>>
>>> 2- Changing visibility at certain zoom levels. I saw it from your codes 
>>> but I couldn't find where you bound your "zoomChanged" function (as event) 
>>> to map object. 
>>> Here is the example:
>>>   map.getView().on('change:resolution', zoomChanged); // this one binds 
>>> the map's resolution change event to zoom changed
>>>
>>>   /**
>>>   * Gets executed when zoom changes on map. Shows or hides required 
>>> layers up to zoom values.
>>>   * @param {Event} event - Event object when zoom changes.
>>>   */
>>>   var zoomChanged = function(event) 
>>>   {
>>>     if (map.getView().getZoom() >= 15) 
>>>     {
>>>       imageLayer.setVisible(true);
>>>     }
>>>     if (map.getView().getZoom() < 15) 
>>>     {
>>>       imageLayer.setVisible(false);
>>>     }
>>>   }
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/426c2092-276d-4f51-8111-9bfd3b3a515d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to