ThinkGeo.com    |     Documentation    |     Premium Support

About Proj4Projection

Hello, Team
Just wondering if there is Proj4Projection in thinkgeo.UI.blazor. How can I use Proj4Projection in a thinkgeo.UI.blazor project? It seems it belongs to ThinkGeo.MapSuite.Shapes namespace. But ThinkGeo.MapSuite.Shapes is based on .net framework not .net core.

Thanks
Min

Thanks Min,
ThinkGeo Blazor is mapsuite 12.0 product. There are some breaking changes for the mapsuite 12.0. We re-organized the API. More detail is here https://wiki.thinkgeo.com/wiki/thinkgeo_12_change_log

We changed the name Proj2Projection. We call it ProjectionConverter now. So in the Blazor/mapsuite 12.0 you can do it like this

layer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, 3857);

All stuff under ThinkGeo.MapSuite.Shapes in mapsuite 10 now moved to the ThinkGeo.Core in mapsuite 12. And it support both .net core and .net freamwork.

Please let us know if you have any more question.

Thanks

Frank

Thanks Frank
It works! I got the other basic question. Just wondering what is the easiest way to get South Australia X and Y for MapView Center? I can get the latitude and longitude from google map. But not sure how to transfer them to X and Y for the Center. Here is my codes:
@code{
PointShape centerPoint = new PointShape(17811118.526923772, -5160979.4440497831);}

Thanks
Min

Min,
You could add 3 more lines to do that.

ProjectionConverter projectionConverter = new ProjectionConverter(4326, 3857);
projectionConverter.Open();
PointShape newCenterPoint = projectionConverter.ConvertToInternalProjection(centerPoint) as PointShape;

This could help you convert the point from 3857 to 4326.

if you use ConvertToExternalProjection it will convert from 4326 to 3857.

Thanks

Frank