Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all 3384 articles
Browse latest View live

New Post: Compile Error

$
0
0
Hi

When I add a web reference to my project I get the following error

Error 51 Could not load file or assembly 'file:///C:\Development\gMap\Feb2014\NETv2.0\GMap.NET.Core.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) C:\Development\VisualStudio\vs2012\VB\Forms\nccWMS\nccWMS\SGEN nccWMS

Remove the web reference and it works fine as before, also tried with the .Net 4 version.

Hopefully its something simple I am missing or just being dumb :o)

any Idea?

Regards
Colin

New Post: Compile Error

$
0
0
Sorted fie file was blocked in the properties unblocked and all is good again.

New Post: Count markers on reverse zoom

$
0
0
Hi,

I need to count markers on reverse zoom.

I mean, when I did a reverse zoom and two or more markers overlap, i need to show number of markers next to.

I need help to orient my code.

Thanks!

New Post: Count markers on reverse zoom

$
0
0
I think one way would be to have one overlay with invisible markers (they don't draw anything), the marker enlist it's position in a data structure keeping track of overlap and markers, when the viewport changes (zoom / move), the datastructure is cleared and the markers need to enlist themselves again.

one another layer in which markers are cleared and recalculated anytime the viewport changes you have actual markers, using the datastructure to find markers without overlap (so you draw them normally) and those with overlap.(you place a custom marker which will show the count of overlapping marers)

Does it make sense?

New Post: Two gmapControl for one place

$
0
0
I've created this discussion is about 4 months ago. At the time, I needed for the answer.

However, I used your today's answer at the time, but I did not receive my wishes.

The problem is that in addition to the zoom level, the point where it will zoom in on the maps, must be one in both.

New Post: Two gmapControl for one place

$
0
0
map2.Position = map.Position;
map2.Zoom = map1.Zoom;

and vice versus for map2 events

sorry for delay, many requests and only a few helpers here ;}

New Post: Two gmapControl for one place

New Post: accessing Bingmaps using api/client-key

$
0
0

Itwillshow upasanon-billabletransactionifitisaddedtothetileURLinthereports.Itisn’tneededonthetheindividualtileURL’s atthistime.


New Post: GSM Painting

$
0
0
Sorry, I really do not know much English. I need to draw on the map something
Image
I mapped the image of the base station.
Next, draw a sector of its coverage.
My problem is that I can not draw the correct sector. I know that in urban areas covering the base station within 9km, in practice, in theory up to 35km. How do I draw a sector in the correct proportions.

New Post: GSM Painting

$
0
0
Can you give an example if the data to be evaluated?

New Post: GSM Painting

$
0
0
Once again, very sorry for the English, I write with the help of GoogleTranslate
Now with increasing distance, or the scale of my sector is comparable to the scale of the map. And I want to size does not change when the zoom level.
And the second question, what parameters to assign the rectangle so that it met the 9 km on the map?



public class GMapMarkerSector : GMapMarker
{
    public int azimuth; 


    public GMapMarkerCircle(PointLatLng p)
        : base(p)
    {
      var  startangle=(azimuth-90)%360;
      var  endangle=2*startangle;

    }

    public override void OnRender(Graphics g)
    {
                        g.DrawPie( new Pen(Color.Red, 3) , new System.Drawing.Rectangle(LocalPosition.X , LocalPosition.Y, 100, 100,startangle,endangle));

    }
}
}

New Post: GSM Painting

$
0
0
check demo:
// add demo circle
      void MainMap_MouseDoubleClick(object sender, MouseEventArgs e)
      {
         var cc = new GMapMarkerCircle(MainMap.FromLocalToLatLng(e.X, e.Y));
         objects.Markers.Add(cc);
      }
and in your custom marker
public override void OnRender(Graphics g)
      {
         int R = (int)((Radius) / Overlay.Control.MapProvider.Projection.GetGroundResolution((int)Overlay.Control.Zoom, Position.Lat)) * 2;

         if(IsFilled)
         {
            g.FillEllipse(Fill, new System.Drawing.Rectangle(LocalPosition.X - R / 2, LocalPosition.Y - R / 2, R, R));
         }
         g.DrawEllipse(Stroke, new System.Drawing.Rectangle(LocalPosition.X - R / 2, LocalPosition.Y - R / 2, R, R));
      }
..to optimize performance ,calculate size only when zoom level changes

Created Unassigned: Windows Mobile version freezes randomly when dragging [16107]

$
0
0
Hello,
First of all thank you Radioman for this great library !

We noticed that the control freezes in Windows Mobile version when you do fast and multiple drag of the map.

I analyzed the code and could see that it was freezing because two LoadTile threads were in "wait" mode.
I do not have enough time to analyze the whole code of Core class, but I can tell you that setting GThreadPoolSize to 1 in Windows Mobile application ("PocketPC" conditional-compilation) seems to bypass the problem.

Do you think it is necessary to have multiple threads in Windows Mobile app ? Will it realy slow the software if we use only one thread on WM machines ?

I hope my contribution can help.

Greetings

Commented Unassigned: Windows Mobile version freezes randomly when dragging [16107]

$
0
0
Hello,
First of all thank you Radioman for this great library !

We noticed that the control freezes in Windows Mobile version when you do fast and multiple drag of the map.

I analyzed the code and could see that it was freezing because two LoadTile threads were in "wait" mode.
I do not have enough time to analyze the whole code of Core class, but I can tell you that setting GThreadPoolSize to 1 in Windows Mobile application ("PocketPC" conditional-compilation) seems to bypass the problem.

Do you think it is necessary to have multiple threads in Windows Mobile app ? Will it realy slow the software if we use only one thread on WM machines ?

I hope my contribution can help.

Greetings
Comments: On my hd2 it works 99% ok, what version have you tested, is it repeatable?

Created Unassigned: Still Being Worked On / NuGet Updated? [16108]

$
0
0
Nuget's last update was "Wednesday, January 30 2013 ", is this still being updated ? Is nuget the latest build ? Will you be keeping nuget up to date ?

New Post: Yahoo map provider was terminated

Closed Unassigned: Hi all, help with GMAP [16106]

$
0
0
Urgent, I need a reference guide as complete GMAP you may have please.
or failing to BINGMAPS since I work with that provider GMAP maps.
Comments: it's in documentation and demos are simple to understand bing now is supported in official way.

Closed Unassigned: FromLatLngToLocal > FromLocalToLatLng [16104]

$
0
0
Hello!
```
PointLatLng originalPosition = marker.Position;

GPoint gMapPointOld = GMapControl_Main.FromLatLngToLocal(originalPosition);
Point screenPointOld= new Point(gMapPointOld.X - marker.Size.Width / 2, gMapPointOld.Y - marker.Size.Height);
PointLatLng newPos = GMapControl_Main.FromLocalToLatLng(screenPointOld.X, screenPointOld.Y);

//Reverting...

GPoint gMapPointNew = GMapControl_Main.FromLatLngToLocal(newPos);
Point screenPointNew = new Point(gMapPointNew.X + marker.Size.Width / 2, gMapPointNew.Y + marker.Size.Height);
PointLatLng newPosition = GMapControl_Main.FromLocalToLatLng(screenPointNew.X, screenPointNew.Y);
```

Eventually the __originalPosition__ is different from the __newPosition__. Why? How can I make it same?
Comments: this issue was fixed long ago by using parameter useCache as TRUE, it's not by default From(To)LatLngToPixel(PointLatLng p, int zoom, bool useCache)

Commented Unassigned: Three lines of code to fix Credentials for Nearmap [16102]

$
0
0
Hi,

Again, thanks for providing a gread library.

I just want to let you know that I got credentials to work with Nearmap by adding three lines of code described in this post:
http://blog.kowalczyk.info/article/at3/Forcing-basic-http-authentication-for-HttpWebReq.html


regards
Comments: thanks, i'll check it

Commented Unassigned: How can I print GMap.NET maps? [16101]

$
0
0
So there is GMapControl on form. I want to print map, and here is code
```
PrintDocument doc = new PrintDocument { DocumentName = "Map printing file" };
doc.PrintPage += DocOnPrintPage;
PrintDialog dialog = new PrintDialog { Document = doc };
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK) doc.Print();
```
and
```
private void DocOnPrintPage(object sender, PrintPageEventArgs e)
{
var img = View.gmap.ToImage();
System.Drawing.Point loc = new System.Drawing.Point(0, 0);
e.Graphics.DrawImage(img, loc);
}
```

I'm using ToImage() method, but it does not work as I want (it's like PrintScreen, because there are another objects like cursor, dialogbox, etc.) Is there any workaround to implement printing without this objects?

P.S. Gmap.Net.Core and Gmap.Net.WindowForms verison is 1.7.0.0, and .Net FrameWork version is 4.0 and I cant upgrade .Net Framework version, because some of clients are using Windows XP.

P.P.S Thank you for replies
Comments: yeah, current method use 'print screen' trick it's possible to implement real copy of the map, but no one needed that fidelity yet ;} one would set (at least temporary) map.ForceDoubleBuffer = true; (it enables manual double buffer rendering) and then modify OnPaint function to store that temporary image in 'backBuffer' once it's requested if(printRequest) { printRequest = false; saveImage(backBuffer); } ..thats the theory, i'll add this some day // do it yourself is the fastest way ;}
Viewing all 3384 articles
Browse latest View live


Latest Images

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