Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-02-01 Thread Jackie Ng
Yes, I see that problem too.

I think it's because we're not applying buffering to the MVT tile encoder,
so client applications are falsely led to believe that they are legit
separate features and not a single feature that crosses multiple tile
boundaries.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-02-01 Thread Gunter Becker
Hi Jackie,

at least I can now see features on the map. But I think there are two more
issues:

1. When rendering the features in the client application (OpenLayers, QGIS)
the borders of the tiles are rendered, too. It's hard to see with the
Sheboygan dataset. But when you decrease the "Min scale" setting for the
"districts" you might see them in an appropriate zoom level. Or just look at
my uploaded screenshot:

 

2. In my dataset there are tiles that didn't render at all. I assume that it
could be the same issue like in 
https://trac.osgeo.org/mapguide/changeset/9826
   because I can see the
whole dataset correctly rendered in QGIS but not in OpenLayers. So I think
it has to do with the coordinates itself. I can provide you with sample date
if you need some.

Gunter





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-02-01 Thread Jackie Ng
Hi Gunter,

The issue appears to be that current OpenLayers is expecting extra MVT
metadata that the MVT encoder is not encoding in (namely the default extent
of 4096). This screws up the resulting OL feature coordinate computation
(that is expecting this extent value to be there), rendering all the feature
coordinates as NaNs.

Please try this patched MgRenderers.dll

https://download.osgeo.org/mapguide/patches/MG_ticket2835/MgRenderers_ticket_2835.7z

Extract and overwrite your existing copy in your 4.0 Preview 2 installation.

You may also be interested in an updated MVT example attached in this
ticket:

https://trac.osgeo.org/mapguide/ticket/2835

That will properly consume MVT tiles from the Sheboygan sample tileset,
although the style visible ranges are out-of-whack since the OL upgrade,
which I'm still working on tweaking.

Hope this helps.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-01-27 Thread Gunter Becker
Hi Jackie,

I've got one more finding while debugging a Mapbox-Service, that let me to
the conclusion that the issue is propably  MapGuide related:

In OpenLayers up to v4.3.4 all features that were loaded by either
Mapbox-Service or MapGuide-Service have tile coordinates between 0 and 4096
(accordings to the grid size)

In versions above v4.4 the features from the same Mapbox-Service have
pseudomercator coordinates and the features from MapGuide are shown as NaN.

Maybe the MapGuide-Service does only send tile coordinates instead of
pseudomercator coordinates. Maybe that was sufficent for the older versions
but not for the newer once.

Gunter 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-01-27 Thread Gunter Becker
Hi Jackie,

thanks for your reply. I already checked all the release notes up to the
current version and have made the relevant changes. I had now time to look a
little closer into this problem and figured out, that there is an issue with
the coordinates of the geometry and not the styling what was my first
thoght. 

Since the features were displayed in your codesamples up to version 4.3.4 I
would assume that MapGuide delivers the geometry with the correct
coordinates. In all versions higher or equal than 4.4.0 all I can see in
developer tools are geometries with an array of coordinates like that: [NaN,
NaN, , NaN]. So the number of coordinates seems to be correct while the
values are not. It doesn't matter if we create features of type "ol.Feature"
or "ol.render.Feature". I even have used a tileLoadFunction to get more
control over what's happening. But even within in this function I'm not able
to find out where the coordinates were lost. 

So, I wonder what can cause this loss of coordinate values. Could it be that
there is something additional missing in the response from MapGuide that the
newer versions of OpenLayers expects. Any idea?

Thanks, Gunter



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2021-01-11 Thread Jackie Ng
Hi Gunter,

Thank you for pointing out to my attention that the non-OL2 samples still
bundle OpenLayers 4.1 so I would not be surprised that the samples don't
work 1:1 when ported to the latest OpenLayers.

I'll eventually fix up the samples to use the latest OpenLayers as part of:
https://trac.osgeo.org/mapguide/ticket/2834

Until then, the only suggestion I can make is to follow their changelog from
4.1.0 to the current 6.5.0 and observe all breaking changes relating to MVT
tile support.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] MapGuide 4: Displaying MapboxVectorTiles in OpenLayers

2020-12-15 Thread Gunter Becker
Hi,

I'm currently testing the new capabilites of MapGuide 4 and trying to
display some FeatureSources as MVT tiles in our custom OpenLayers Viewer of
version 6.4.3. Unfortunatly I can't get it to work. Although I can see that
the browser received the data the features are not displaying on the map.
The syntax for the MVT-layer was copied from the MapGuide samples that ship
with the installation.

When I copy my ol layer definition into the MapGuide samples then the
features are shown correctly. So I suppose, that the problem relates to the
OpenLayers Version, since the OpenLayers version used in the samples is 4.1.

Has someone else tried displaying MVT tiles from MapGuide in the latest
OpenLayers version? Could it be an issue with the tilegrid size for example?

Thanks, Gunter



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users