Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all 2341 articles
Browse latest View live

New Post: ShapeDrawingOptions for DrawingLayer

$
0
0
Dear pmeens, I found very interesting example TrackCars.cs because I'm trying to display the icons of a drawingLayer. Unfortunately I do not know the C language but I program in VB / VBA. Where can I find an example in this language? I have to briefly create a ShapeFile with icons to be placed in certain coordinates LAT and LONG and show them on my drawingLayer (a map).

Thanks.

Nicolò

New Post: ShapeDrawingOptions for DrawingLayer

New Post: ShapeDrawingOptions for DrawingLayer

New Post: tkCursorMode.cmMeasure apply first point automatically

$
0
0
Hello I was wondering if there is a way to add points of cmMesure programitacally

Thank you

New Post: No map control in Visual Studio 2015 Toolbox after registering MapWinGIS

$
0
0
I wish I could get far enough to have a real problem! :)

I downloaded and installed MapWinGIS-only-v.9.3.5-Win32.exe - on both a Windows 7 and a Windows 8.1 system. I launched VisualStudio 2015 and created a WinForm project. I then added a reference to MapWinGIS components under the COM tab. However, no map control ever appears in the Toolbox.

Admittedly, I don't normally do development in the Microsoft environment - so please forgive me if my question demonstrates my ignorance! I'm sure I'm missing something obvious.

New Post: No map control in Visual Studio 2015 Toolbox after registering MapWinGIS

$
0
0
Sigh. I must be a bit dense (or at least unfamiliar with Visual Studio). Or maybe I just don't follow instructions well. But, in case anybody else finds themselves in this situation, here is the explanation.

I tried to add the reference to MapWinGIS by clicking on the Visual Studio "Project" and selecting "Add Reference". I then selected the COM tab and checked off the MapWinGIS selection. That makes MapWinGIS show up in the references, but the control doesn't show up in the toolbox.

Instead (or in addition to the method described above), right click on the VS Toolbox and click on "Choose Items". Then, click on the COM tab in the window that appears and select that you want the MapWinGIS control to display. This makes the control appear.

New Post: Anyone used the MapWinGIS activeX in a ClickOnce deploy?

$
0
0
Hello all,

I'm trying to deploy my MapWinGIS project using ClickOnce with no luck. Is this not supported?

To isolate what I'm seeing I've created a new, nearly empty project with a single form with a single axmap in visual studio 2013 express. I'm using the latest 4.9.3 32 bit installer to get the activeX registered on my development machine. On my development machine the application builds and runs fine. I can publish the application as a click once installer and this deploys the application flawlessly on my development machine. But when I try to run it on a deployment test machine it bombs out before opening with a non informative "A problem caused the program to stop working" error message.

If I manually install the activeX on the target machine the installer starts working. I've tried changing the Copy Local, Embed Interop Types, and Isolated properties of the AxMapWinGIS and MapWinGIS references with no luck. Is there anything I'm missing here?

Thanks,
Colin

New Post: ShapeDrawingOptions for DrawingLayer

$
0
0
I'm very interested on placing images on drawing layers could you please sen me the quote. Thank you

New Post: Select multiple layers with cmSelection Tool

$
0
0
Thank you, that part of code just solved my problem.

Greetings

New Post: Place a layer on top of drawing layer

$
0
0
Hello i'm trying to place a shapefile layer on top of a drawing layer is there i way to do this. I've been trying but i Can't thank you

New Post: Paint events

$
0
0
Hello i was wondering if mapwingis has a paint event thank you

New Post: Shapefile loading from database and indexing

$
0
0
Hello,

I'm using MapWinGIS 4.9.3 in a C# application to load vector data from a database (SQL Server 2012). My test data is fairly modest, with about 180k features, and the application needs to support murch larger datasets than this.

The test data I'm using is from this source: ftp://ftp2.census.gov/geo/tiger/TIGER2014/RAILS/tl_2014_us_rails.zip. It's in Shapefile format and I used OgrDatasource.ImportShapefile() to import this data into SQL Server.

The issue I'm running into is that the loading via Map.AddLayer() takes a long time and appears to load all at once and blocking the UI. After spending a good amount of time reading past discussions here and browsing the documentation, I have found and tried some suggestions:
1) Lock the map when loading large datasets via tkLockMode.
2) Turn on spatial indexes via Shapefile.CreateSpatialIndex().
3) Use OgrLayer.DynamicLoading property to do data loading dynamically.
4) Use SQL and call OgrLayer.RedefineQuery() to load only the data that's visible in the current Extents.

Unfortunately, none of these tactics helped, and some (such as #4) actually caused more problems. The spatial index and dynamic loading property seem like the most promising approaches, but they don't work. While I'm able to generate a spatial index for my database-loaded Shapefile, the method requires a filename parameter and appears to generate the index on disk rather than in the database. I don't think the index is being used when loading data from the database. Using a spatial database index would be ideal, but I would settle for an on-disk index as long as it's used at load time. The OgrLayer.DynamicLoading property is a mystery to me and it either results in nothing visible on the map, AccessViolationExceptions or other problems which I haven't been able to pin down reliably. DynamicLoading seems to slow down map movements and makes me think it is working at some level, but I've been unable to make it work. Part of the problem is my lack of understanding what the best practices are for loading data from a database since there are multiple ways to achieve the same thing. Namely, there's Map.AddLayerFromDatabase(), OgrDatasource.GetLayerByName(), OgrDatasource.RunQuery() and various combinations of Map.AddLayer().

OgrLayer.RedefineQuery() almost worked. The data was loaded only for the map extents, which resulted in suitable performance at low zoom levels. The problem was that the layer would get randomly restyled on every call, and Shapefile.SelectShapes() would no longer work due to the Shapefile having no shapes (NumShapes = 0).

Sorry for the long post again, but can anybody give me any advice?

Thanks

New Post: Place a layer on top of drawing layer

New Post: Place a layer on top of drawing layer

$
0
0
Thanks for the advice. I did try that but it didin't work. It seems that the drawing layer is in top of all. I made another class that manipulates a shapefile i create there polygon shapefiles, and also place some icons.

New Post: OgrLayer.SaveChanges saves points with equal coordinates

$
0
0
Hello to everybody.
I'm using Vb.Net.
I edit shapefile, loaded from PostGis, using theese functions:
Dim ds = New OgrDatasource()
...
Dim objects = AxMap1.get_Shapefile(AxMap1.AddLayer(ds.GetLayerByName("objects", True), True))
objects.StartEditingShapes(True)
for 
   objects.EditAddShape(point)
next
objects.Save()
objects.StopEditingShapes(True, True)
mf.AxMap1.get_OgrLayer(1).SaveChanges(count, tkOgrSaveType.ostSaveAll)
There are no errors in OgrLayer.UpdateSourceErrorCount.
As result I give all points in PostGis database with right attributes and wrong geometries, all the points have equal coordinates.

How can I fix this?

New Post: OgrLayer.SaveChanges saves points with equal coordinates

New Post: Load tiles from folder

$
0
0
Hi,
As I saw, mapwingis can PrefetchToFolder , for further offline use.
I did that and that works very well. But now, I want to load this images from folder. How can I do that?

New Post: Anyone used the MapWinGIS activeX in a ClickOnce deploy?

$
0
0
Hi Colin,

I haven't done exactly what you're trying to accomplish, but I've researched it a bit since we'll have to solve the same problem.

Basically, copying the file is not enough; the library needs to be registered with Windows. After some research, it appears other COM libraries and OCX controls can be registered "on the fly" by first checking if they're available for loading, and then registering them in case they are not. I haven't had luck using this approach with MapWinGIS, but I don't see why it would be different. I don't have time to experiment with this right now, but I wanted to let you know of the approach so that you can try it.

Good luck, and please let me know if you get it working :)

New Post: Anyone used the MapWinGIS activeX in a ClickOnce deploy?

$
0
0
I am having the same issues. The following error is coming up

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {C0EAC9EB-1D02-4BD9-8DAB-4BF922C8CD13} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at RF_Design_Tool.CellDashBoard..ctor()
at RF_Design_Tool.Form1.cellInfoToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

YOHO
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/upaudel/AppData/Local/Apps/2.0/T422CNZC.8CB/V2OBQZL9.3VP/yoho..tion_f11b476ec4b431e0_0003.0000_e4a2797e96272720/YOHO.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Deployment
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34244 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Interop.MapWinGIS
Assembly Version: 4.9.0.0
Win32 Version: 4.9.0.0

CodeBase: file:///C:/Users/upaudel/AppData/Local/Apps/2.0/T422CNZC.8CB/V2OBQZL9.3VP/yoho..tion_f11b476ec4b431e0_0003.0000_e4a2797e96272720/Interop.MapWinGIS.DLL

AxInterop.MapWinGIS
Assembly Version: 4.9.0.0
Win32 Version: 4.9.0.0

CodeBase: file:///C:/Users/upaudel/AppData/Local/Apps/2.0/T422CNZC.8CB/V2OBQZL9.3VP/yoho..tion_f11b476ec4b431e0_0003.0000_e4a2797e96272720/AxInterop.MapWinGIS.DLL

Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

System.Windows.Forms.DataVisualization
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll

MySql.Data
Assembly Version: 6.1.6.0
Win32 Version: 6.1.6.0

CodeBase: file:///C:/Users/upaudel/AppData/Local/Apps/2.0/T422CNZC.8CB/V2OBQZL9.3VP/yoho..tion_f11b476ec4b431e0_0003.0000_e4a2797e96272720/MySql.Data.DLL

System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll

System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll

System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

New Post: Anyone used the MapWinGIS activeX in a ClickOnce deploy?

$
0
0
Thanks, saskuach,

I had seen this idea of registering the ocx on the fly through manipulating the manifest file. I even attempted to implement it but quickly came to the realization that I was in over my head. It would probably be entirely doable for someone with the right knowledge and tools but I was left scratching my head. It seemed that besides registering the ocx there were some other dlls/registry settings that the OCX needed to function properly. It also seemed that it might require recompiling the OCX which I don't think is possible in the express version of visual studio that I'm using.

I've settled on a stop gap solution of having my users separately and manually install the mapwingis ocx with an admin account. And then in their regular account install my clickonce application. It's admittedly a bit clunky but the first step only needs to be done once on each computer. I'm hoping that this auto registration will magically just work with the 5.0 release of the ocx, if not I might explore further.

I didn't keep the demo apps that I was exploring this through but the result was about like what yousuf14 is sharing.

Cheers,
Colin
Viewing all 2341 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>