Unable to read the Project file GMap.NET.Csproj

Jan 19, 2009 at 8:38 AM
Hi developers,

              I am new to .NET and also to Gmap4dotnet. Whenever i execute the downloaded source code i am getting the following error. can u please suggest regarding this.....

      Unable to read the project filr GMap.NET.Csproj
C:\Documents and Settings\Asif\Desktop\GMap.NET\GMap.NET.Csproj(127,11): The imported prlject "C:\Microsoft.Csharp.targets" was not found. Confirm that the path in the <Import> Declaration is correct, and that the file exists on the disk.

Thank Regards
Asif
Coordinator
Jan 19, 2009 at 8:55 AM
goto folder GMap.NET\Solution\ and launch GMap.sln
Jan 19, 2009 at 9:14 AM
First of all thanks radioman,
      I launch GMap.Sln but its not opening. my idea is
1. I want to load the gmap in C# form.
2. Displaying different markers on the map by using different lats and lons
3. connecting markers with polylines

These things i did with java script. but i need to do this using C#. I downloaded the GMap.NET.dll file from this website and i added this file in References. I opened it using View in Object browser, several methods,classes etc... are available. So can u please guide me regarding this...

Thank Regard
Asif
Coordinator
Jan 19, 2009 at 9:29 AM
Edited Jan 19, 2009 at 9:30 AM
Try open that from visual studio, file->open->project/solution. What version of VS you use? Or you can can use only dll, drag it to VS toolbox, then to your form, should work
Jan 19, 2009 at 9:48 AM
Thanks for reply radioman, 
                   I opened file->open->project/solution. the following error occured.
          " The selected file is a solution file but it was created by a newer version of application and cannot be opened" and
I am using Visul Studio.NET 2005.

Thank Regards
Asif
Coordinator
Jan 19, 2009 at 10:04 AM
Edited Jan 19, 2009 at 10:05 AM
mm, i see now, i use 2008 version, i don't have old one, so you have few choices, use dll without sources, or by hand from files reconstruct project in 2005 version. Ofcourse to upgrade to 2008 version is even better. More stable product, as from my experiance crashes occureaces very rare.
Jan 19, 2009 at 10:27 AM
Thank a lot radioman,
    I am going through GMap.NET.dll , i added it in project references. but  i am not understanding how to use those classes, interfaces, methods in my project. can u send a sample program for loading google map in C# .NET form. The following source code i am using for getting google map in my form i use a webbrowser control.

Note: I am using Visual Studio.NET 2005

using

System;

 

using

System.Collections.Generic;

 

using

System.ComponentModel;

 

using

System.Data;

 

using

System.Drawing;

 

using

System.Text;

 

using

System.Windows.Forms;

 

namespace

a26_12_2008

 

{

 

public partial class frmMap : Form

 

{

 

public frmMap(string lat, string lon)

 

{

InitializeComponent();

 

 

if (lat == string.Empty || lon == string.Empty)

 

{

 

this.Dispose();

 

}

 

try

 

{

 

StringBuilder queryAddress = new StringBuilder();

 

queryAddress.Append(

"http://maps.google.com/maps?q=");

 

 

 

 

if (lat != string.Empty)

 

{

queryAddress.Append(lat);

}

 

 

 

if (lon != string.Empty)

 

{

queryAddress.Append(lon);

}

 

 

// webBrowser1.Navigate(queryAddress.ToString());

 

 

//queryAddress.Append("N12.95");

 

 

//queryAddress.Append("E77.616667");

 

webBrowser1.Navigate(queryAddress.ToString());

webBrowser1.DocumentText.ToString();

 

}

 

catch (Exception ex)

 

{

 

MessageBox.Show(ex.Message.ToString(), "Error");

 

}

 

}

 

}

}

Coordinator
Jan 19, 2009 at 10:48 AM
simple app source is in GMap.NET\GMapApp. All is ready but you need recreate it to 2005 version, you need import all source code, and VS should build it.
Jan 19, 2009 at 11:03 AM
Edited Jan 19, 2009 at 11:04 AM
Thanks radioman,

       I will do my level best.

Regards
Asif
Coordinator
Jan 19, 2009 at 1:15 PM
check http://www.emmet-gray.com/Articles/ProjectConverter.htm

try to use that converter, it should convert 2008 solution to 2005 "_^
Jan 20, 2009 at 5:20 AM
Edited Jan 20, 2009 at 5:35 AM
Hi Radioman,
 
                   Thanks a lot for providing the converter and i converted a solution project into vs.net 2005 . when ever i run that one it will displays output but it is not displaying google map.Actually i want to display markers on google map in C# form. My java script code is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Google Maps</title>

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAIzvWEPXT4yXfiLp2DLLqpBRAD2eQqjjLhsqM5TNK0P5A5aeCNhS5GP4AXDwLFU8tVNTYaDgLq-1Y6A" type="text/javascript"></script>
  </head>
  <body onunload="GUnload()">

    <div id="map" style="width: 600px; height: 600px"></div>

    <script type="text/javascript">

    //<![CDATA[
   
    if (GBrowserIsCompatible()) {
      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());

      map.setCenter(new GLatLng(17.3836523350338,78.46541278343632), 12);
      var point = new GLatLng(17.42566762633645,78.34305354153429);
      var marker = createMarker(point,'<div style="width:240px"> Wipro <a href="Link<\/a">http://www.wipro.com">Link<\/a> to my wipro home<\/div>')
      map.addOverlay(marker);

 

      var point = new GLatLng(17.42057225253198,78.6343150998329);
      var marker = createMarker(point,'<h1>Ghatkesar</h1>')
      map.addOverlay(marker);

     
      var point = new GLatLng(17.3836523350338,78.46541278343632);
      var marker = createMarker(point,'<h1>Deccan College</h1>')
      map.addOverlay(marker);
      var polyline = new GPolyline([

      new GLatLng(17.3836523350338,78.46541278343632),

      new GLatLng(17.42566762633645,78.34305354153429),

    new GLatLng(17.42057225253198,78.6343150998329)

  ], "#001122", 20);

       map.addOverlay(polyline);

 

 var blueIcon = new GIcon(G_DEFAULT_ICON);
 
 blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png";
 markerOptions = { icon:blueIcon };
        var bounds = map.getBounds();
        var southWest = bounds.getSouthWest();
        var northEast = bounds.getNorthEast();
        var lngSpan = northEast.lng() - southWest.lng();
        var latSpan = northEast.lat() - southWest.lat();
        for (var i = 0; i < 10; i++) {
          var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
                                  southWest.lng() + lngSpan * Math.random());
          map.addOverlay(new GMarker(point,markerOptions));
        }
    }
   
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

      //]]>

    </script>

  </body>

</html>

Can u give some suggestions regarding this issue

Regards
Asif

Coordinator
Jan 20, 2009 at 5:23 AM
hey, does it work good?
Jan 20, 2009 at 5:44 AM
Edited Jan 20, 2009 at 5:45 AM
Hi Radioman

          First of all thanks for replying fastly, Its working nicely, The default marker located at the center and i added several markers using addmarker button. i performed zoom operation but except routing all operations i performed, Here one problem is google map is not loaded at all and i need to perform those operations on google maps. So what can i do for performing the above operations....


Thank Regards
Asif

Coordinator
Jan 20, 2009 at 6:13 AM
check example application, you simply need call map.ReloadMap(); on form shown event
Jan 20, 2009 at 6:59 AM
Edited Jan 20, 2009 at 7:08 AM
Hi Radioman,

       I downloaded "initial tooltip support" from sources. I converted that project into Visual Studio.NET 2005. Whenever i execute it it will display the following errors.I kept these errors in comments and when ever i run the project it displays Microsoft Visual Studio Window. That Window the follwoing Message
 
        The following module was built either with optimizations enabled or without debug information:
    C:\Documents and Settings\Asif\Desktop\aaa20\Build\Debug\GMap.NET.dll
 To Debug this module, change its project build configuration to debug mode. To suppress this message, disable the Warn if no user code on launch' debugger option.


Is it necessary to include some name space to this project. Guide me regarding this.......

Error 1 'GMapNET.Marker' does not contain a definition for 'Mode' C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 220 16 GMapApp

Error 2 The name 'MarkerTooltipMode' does not exist in the current context C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 220 23 GMapApp

Error 3 'GMapNET.Marker' does not contain a definition for 'Mode' C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 225 16 GMapApp

Error 4 The name 'MarkerTooltipMode' does not exist in the current context C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 225 23 GMapApp

Error 5 'GMapNET.Marker' does not contain a definition for 'Mode' C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 245 12 GMapApp

Error 6 The name 'MarkerTooltipMode' does not exist in the current context C:\Documents and Settings\Asif\Desktop\aaa20\GMapApp\Forms\MainForm.cs 245 19 GMapApp

Thank Regards
Asif


Coordinator
Jan 20, 2009 at 7:07 AM
ofcourse, you need to rebuild solution from new sources, i think you try to use new functions with old source/dll
Jan 20, 2009 at 7:16 AM
Edited Jan 20, 2009 at 7:34 AM
Hi Radioman,

     I executed sample application "GMapApp" without errors, Its output is like this but it doesn't display the google map. the source(Mainform.cs) for this sample is


using 

System;

 

 

 

using System.Collections.Generic;

 

 

 u

sing System.Globalization;

 

 

 

using System.Windows.Forms;

 

 

 

using GMapNET;

 

 

 

namespace GMapApp

 

 

 {

 

public partial class MainForm : Form

 

{

 

 

PointLatLng start;

 

 

PointLatLng end;

 

 

public MainForm()

 

 

 {

InitializeComponent();

 

if(!DesignMode)

 

 {

 

// config map

 

 

MainMap.RenderMode = GMapRenderMode.GDI;

 

 MainMap.UseTileCache = 

true;

 

 MainMap.UseRouteCache = 

true;

 

 MainMap.UseGeocoderCache = 

true;

 

 MainMap.MapType =

GMapType.Map;

 

 MainMap.Zoom = 13;

MainMap.Language =

"lt";

 

 MainMap.CurrentPosition =

new PointLatLng(54.6961334816182, 25.2985095977783);

 

 MainMap.OnCurrentPositionChanged += 

new GMapControl.CurrentPositionChanged(MainMap_OnCurrentPositionChanged);

 

 MainMap.OnTileLoadStart += 

new GMapControl.TileLoadStart(MainMap_OnTileLoadStart);

 

 MainMap.OnTileLoadComplete += 

new GMapControl.TileLoadComplete(MainMap_OnTileLoadComplete);

 

 

// get map type

 

comboBoxMapType.DataSource =

Enum.GetValues(typeof(GMapType));

 

 comboBoxMapType.SelectedItem = MainMap.MapType;

 

// get render type

 

 

comboBoxRenderType.DataSource = Enum.GetValues(typeof(GMapRenderMode));

 

 comboBoxRenderType.SelectedItem = MainMap.RenderMode;

 

// get cache modes

 

 

checkBoxUseTileCache.Checked = MainMap.UseTileCache;

 

checkBoxUseRouteCache.Checked = MainMap.UseRouteCache;

checkBoxUseGeoCache.Checked = MainMap.UseGeocoderCache;

 

// get zoom

 

 

trackBar1.Value = MainMap.Zoom;

 

}

}

 

// loader start loading tiles

 

void MainMap_OnTileLoadStart(int loaderId)

 

 {

 

switch(loaderId)

 

 {

 

case 1:

 

 progressBar1.Show();

 

break;

 

 

case 2:

 

 progressBar2.Show();

 

break;

 

 

case 3:

 

 progressBar3.Show();

 

break;

 

 }

groupBoxLoading.Invalidate(

true);

 

 }

 

// loader end loading tiles

 

void MainMap_OnTileLoadComplete(int loaderId)

 {

 

switch(loaderId)

 

 {

 

case 1:

 

 progressBar1.Hide();

 

break;

 

 

case 2:

 

 progressBar2.Hide();

 

break;

 

 

case 3:

 

 progressBar3.Hide();

 

break;

 

 }

groupBoxLoading.Invalidate(

 true);

 

}

 

// current point changed

 

 

void MainMap_OnCurrentPositionChanged(PointLatLng point)

 

 {

textBoxCurrLat.Text = point.Lat.ToString(

CultureInfo.InvariantCulture);

 

 textBoxCurrLng.Text = point.Lng.ToString(

CultureInfo.InvariantCulture);

 

 }

 

// change rendering mode

 

 

private void comboBoxRenderType_DropDownClosed(object sender, EventArgs e)

 

 {

MainMap.RenderMode = (

GMapRenderMode) comboBoxMapType.SelectedValue;

 

 MainMap.ReloadMap();

comboBoxRenderType.SelectedItem = MainMap.RenderMode;

}

 

// change map type

 

 

private void comboBoxMapType_DropDownClosed(object sender, EventArgs e)

 

 {

MainMap.MapType = (

GMapType) comboBoxMapType.SelectedValue;

 

 MainMap.ReloadMap();

}

 

// zoom

 

 

private void trackBar1_ValueChanged(object sender, EventArgs e)

 

 {

MainMap.Zoom = trackBar1.Value;

MainMap.ReloadMap();

}

 

// go to

 

 

private void button8_Click(object sender, EventArgs e)

 

 {

 

double lat = double.Parse(textBoxLat.Text, CultureInfo.InvariantCulture);

 

 

double lng = double.Parse(textBoxLng.Text, CultureInfo.InvariantCulture);

 

 MainMap.CurrentPosition =

new PointLatLng(lat, lng);

 

 MainMap.GoToCurrentPosition();

}

 

// goto by geocoder

 

 

private void textBoxGeo_KeyPress(object sender, KeyPressEventArgs e)

 

 {

 

if((Keys) e.KeyChar == Keys.Enter)

 

 {

 

if(!MainMap.SetCurrentPositionByKeywords(textBoxGeo.Text))

 

 {

 

MessageBox.Show("Google Maps Geocoder can't find: " + textBoxGeo.Text, "GMap.NET", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

 

 }

 

else

 

 

{

 

MainMap.GoToCurrentPosition();

}

}

}

 

// get draw mode sometimes...

 

 

private void MainMap_MouseDown(object sender, MouseEventArgs e)

 

 {

 

if(e.Button == MouseButtons.Right)

 

 {

comboBoxRenderType.SelectedItem = MainMap.RenderMode;

}

}

 

// reload map

 

 

 private void button1_Click(object sender, EventArgs e)

 

 MainMap.ReloadMap();

}

 

// load

 

 

private void MainForm_Shown(object sender, EventArgs e)

 

 {

MainMap.ReloadMap();

 }

 

// cache config

 

 

private void checkBoxUseCache_CheckedChanged(object sender, EventArgs e)

 

 {

MainMap.UseTileCache = checkBoxUseTileCache.Checked;

MainMap.UseRouteCache = checkBoxUseRouteCache.Checked;

MainMap.UseGeocoderCache = checkBoxUseGeoCache.Checked;

}

 

// clear cache

 

private void button2_Click(object sender, EventArgs e)

 {

 

if(MessageBox.Show("Are You sure?", "Clear GMap.NET cache?", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)

 

 {

 

try  {

 

System.IO.

Directory.Delete(MainMap.Cache, true);

 }

 

catch(Exception ex)

 

 {

 

MessageBox.Show(ex.Message);

 

 }

}

}

 

// add test route

 

 

private void button3_Click(object sender, EventArgs e)

 

 {

 

// klaipeda - vilnius

 

 

//PointLatLng start = new PointLatLng(55.70466, 21.2261);

 

 

//PointLatLng end = new PointLatLng(54.654769, 25.224609);

 

 

// testing route

 

 

//PointLatLng start = new PointLatLng(54.7290810525512, 25.2708721160889);

 

 

//PointLatLng end = new PointLatLng(54.710441321148, 25.314474105835);

 

 

List<PointLatLng> route = MainMap.GetRouteBetweenPoints(start, end, false);

 

 

if(route != null)

 

 {

 

// add route

 

 

Route r = new Route(route, "test");

 

 MainMap.AddRoute(r);

 

// add route start/end marks

 

 

 Marker m1 = new Marker(start, MarkerType.Medium, MarkerColor.Green);

 

 

Marker m2 = new Marker(end, MarkerType.Medium, MarkerColor.Yellow);

 

 MainMap.AddMarker(m1);

MainMap.AddMarker(m2);

}

}

 

private Random rand = new Random();

 

 

public T RandomEnum<T>()

 

 {

T[] values = (T[]) 

 Enum.GetValues(typeof(T));

 

 

return values[rand.Next(0, values.Length)];

 

 }

 

// add marker on current position

 

 

private void button4_Click(object sender, EventArgs e)

 

 {

 

Marker m = new Marker(MainMap.CurrentPosition, RandomEnum<MarkerType>(), RandomEnum<MarkerColor>());

 

 MainMap.AddMarker(m);

}

 

// clear routes

 

 

 private void button6_Click(object sender, EventArgs e)

 

 {

MainMap.ClearAllRoutes();

}

 

// clear markers

 

 

private void button5_Click(object sender, EventArgs e)

 

 {

MainMap.ClearAllMarkers();

}

// show current marker

 

private void checkBoxCurrentMarker_CheckedChanged(object sender, EventArgs e)

 

 {

MainMap.CurrentMarkerEnabled = checkBoxCurrentMarker.Checked;

}

 

// can drag

 

 

private void checkBoxCanDrag_CheckedChanged(object sender, EventArgs e)

 

 {

MainMap.CanDragMap = checkBoxCanDrag.Checked;

}

 

// set route start

 

 

private void buttonSetStart_Click(object sender, EventArgs e)

 

{

start = MainMap.CurrentPosition;

}

 

// set route end

 

 

private void buttonSetEnd_Click(object sender, EventArgs e)

 

 {

end = MainMap.CurrentPosition;

}

}

}

 

 

Coordinator
Jan 20, 2009 at 7:29 AM
does it load when you manualy hit Reaload button? if yes, check form Shown event and set to MainForm_Shown function
Jan 20, 2009 at 7:55 AM
Hi Radioman,

            Whenver i click on Reaload button, The map reloads i.e, process bar 1 is working but remaining process bars are hidden. My doubt is i am not getting the sentence " form shown event and set to MainForm_Shown function. can u elaborate it please

Regards
Asif
Coordinator
Jan 20, 2009 at 8:03 AM
if you see map when you reaload it ok. Go to your form desinger, in properties windows choose events, find 'Shown' and choose MainForm_Shown
Jan 20, 2009 at 9:11 AM
Edited Jan 20, 2009 at 9:25 AM
Hi radioman,
  
               I am not seeing google map after reaload but i will see a black color instead of map and one marker displayed at the center of the map(black color). designer->properties->I chosen events and after that i shown MainForm_shown. Then also the output is same as bellow

The output look like this

                            *-------------* zoom coordinates
                            *                    * ---  -   -------
                            *          0        *
                            *-------------*          loading

"0 " is nothing but a Marker displayed at center and rest of the thing will be black color buy no map will be displayed still its able to perform the following operations
1. add marker, clear marker
2. zoom in , zoom out
3. goto
4. reaload

Thank Regards
Asif
Coordinator
Jan 20, 2009 at 9:28 AM
do you see map in official release build? And what type of map you use Map or Satellite?
Jan 20, 2009 at 9:38 AM
Hi Radioman,

            I already forwarded a java script program. In that i can able to use google map and displayed some markers on the map and a single polyline that connects several markers,Any type out of the three i.e,  google satellite map,google hybrid map.

Thank Regards
Asif
Coordinator
Jan 20, 2009 at 9:55 AM
this control has no connections to any javascripts, i asked about demo app?
Jan 20, 2009 at 10:07 AM
Hi Radioman,

        In demo application i need to display any type of google map( google map, google satellite map, google hybrid map) actually whenever i run it is not displaying google map but it will display a black color in GMapNET.GMapControl area. So guide regarding this issue.

Regards
Asif
Coordinator
Jan 20, 2009 at 10:33 AM
i've no idea ;}
Jan 20, 2009 at 10:54 AM
Edited Jan 20, 2009 at 10:58 AM

Hi radioman,

                      I written a small program by using GMap.NET.Dll. I use GMapControl for displaying a google map in my C# form. When ever i ran the program it will not display the google map but it will display one marker. Is it possible to display google map in the form. Can u please give guidance regarding this and i am using visual studio.net 2005. My program is

note : - I need to use google Satellite map the

using

System;

 

 

using

System.Collections.Generic;

 

 

using

System.ComponentModel;

 

 

using

System.Data;

 

 

using

System.Drawing;

 

 

using

System.Text;

 

 

using

System.Windows.Forms;

 

 

using

GMapNET;

 

 

namespace

codeplex20_01_2009

 

{

 

 

public partial class Form1 : Form

 

 

{

 

public Form1()

 

{

InitializeComponent();

gMapControl1.ReloadMap();

 

 

}

 

private void gMapControl1_Load(object sender, EventArgs e)

 

{

gMapControl1.ReloadMap();

}

}

}
Thank Regards
Asif

 

Coordinator
Jan 20, 2009 at 11:02 AM
use shown event, and set initial coordinates, zoom, language
Jan 20, 2009 at 11:22 AM
hi radioman

     This is my updated code i ran the program still i am not able to display google satellite map. If any thing  i need to change provide some sort of guidence for getting google satellite map in my C# form.

      

namespace

codeplex20_01_2009

 

{

 

public partial class Form1 : Form

 

{

 

PointLatLng start=new PointLatLng (17.42566762633645,78.34305354153429);

 

 

PointLatLng end = new PointLatLng(17.42057225253198, 78.6343150998329);

 

 

public Form1()

 

{

InitializeComponent();

gMapControl1 .MapType =

GMapType .Satellite ;

 

gMapControl1.Zoom = 13;

gMapControl1.Language =

"lt";

 

gMapControl1.CurrentPosition =

new PointLatLng(17.3836523350338, 78.46541278343632);

 

gMapControl1.ReloadMap();

 

Marker m1=new Marker (start,MarkerType.Medium ,MarkerColor .Yellow );

 

 

Marker m2=new Marker (end, MarkerType.Medium ,MarkerColor .Green );

 

gMapControl1 .AddMarker(m1 );

gMapControl1 .AddMarker (m2);

gMapControl1.ReloadMap();

 

}

 

private void Map_Shown(object sender, EventArgs e)

 

{

gMapControl1.ReloadMap();

}
}
Thank Regards
Asif

Coordinator
Jan 20, 2009 at 11:32 AM
..maybe you reach google data usage limit, can you see maps in browser?
Jan 20, 2009 at 11:59 AM
hi radioman,

          my program was executed but i didn't seen the google map. Instead of google map i seen black color and one marker displayed at the center. i need to write some thing more. can u please provide some guidance....

regards
asif
Jan 20, 2009 at 12:20 PM
hi radioman,

  You can load google maps in a browser by using this link

http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAIzvWEPXT4yXfiLp2DLLqpBRAD2eQqjjLhsqM5TNK0P5A5aeCNhS5GP4AXDwLFU8tVNTYaDgLq-1Y6A 

or

http://maps.google.com

    but in my application how it will be i am not getting. provide some sort of guidance...........
thank regards
asif
Coordinator
Jan 20, 2009 at 12:24 PM
...later
Jan 20, 2009 at 12:37 PM
Hi radioman,

      I already forwarded a java script program. copy that one and paste it in notepad, save it with extension .html and run it by using internet explorer. then you can see a google map in web browser.

Regards
Asif
Jan 21, 2009 at 5:39 AM
Edited Jan 21, 2009 at 6:12 AM
Hi radioman,

        I executed the same application in vs.net 2008 then also i am not getting google map in my form but i am able to see one marker and 2009 Google-Map Data  2009 TeleAtlas. guide me regarding this.....

Regards
Asif
Coordinator
Jan 21, 2009 at 6:18 AM
i have no idea ;}
Jan 21, 2009 at 9:26 AM
Hi Radioman,

       I successfully executed the program in C#.NET 2005 and located a single marker.There is no problem at all in the program but problem with internet. Here internet is slow b/c of this reason the map was not at all displayed. Really sorry for that and i am going through how to display several markers in google map. Thanks alot for developing a GMapNET.dll. Its very nice thing...

Thanks &  Regards
Asif
Coordinator
Jan 21, 2009 at 10:55 AM
Edited Jan 21, 2009 at 10:56 AM
i see, hm... maybe i try to increase timeout value, so even slow connections can load maps.

p.s. do not post the same text on few discusions ;}
Jan 21, 2009 at 11:11 AM
Edited Jan 21, 2009 at 11:34 AM
Hi Radioman,

         I am sorry about that one and i will not repeat it. Thanks a  lot... and one more suggestion i need, whenever i run the program it displays a draggable marker at the center of gmap. I want to display only static marker so which function i need to use for displaying a static marker at center of map and i want to move the map to left, right, top, bottom..

Thanks & Regards
Asif
Coordinator
Jan 21, 2009 at 11:24 AM
Edited Jan 21, 2009 at 11:25 AM

// hides current location marker
MainMap.CurrentMarkerEnabled = false;

// adds static marker
MainMap.AddMarker(...);

Jan 21, 2009 at 11:38 AM
Hi Radioman,

        I added those statements but how can i move the map to left, right, up, down.

Thanks & Regards
Asif
Coordinator
Jan 21, 2009 at 11:43 AM
;] drag it holding right
Jan 21, 2009 at 11:51 AM
Edited Jan 21, 2009 at 11:57 AM
Hi Radioman,
 
              Yes i did that one but its not working. If i use Zoom option then i can see world map. After zooming i want to drag the map to left, right,top,bottom.Give some guidance regarding this

Thanks & Regards
Asif
Coordinator
Jan 21, 2009 at 11:58 AM
yes it work, no you didn't ;}
Jan 21, 2009 at 12:04 PM
Hi Radioman,

         Its working. I am very sorry. i am using mouse left button but just now i tried with mouse right button it working

Thank Regards
ASif
Coordinator
Jan 21, 2009 at 12:09 PM
;}
Jan 21, 2009 at 1:09 PM
Hi Radioman,

 

List

<PointLatLng> route = gMapControl1.GetRouteBetweenPoints(start, end, true);

 

 

Route r1 = new Route(route, "test");

 

r1.Color =

Color.Beige;

 

route.Add(start);

gMapControl1.AddRoute(route);


     Whenever i execute a program with above code it will display a route (polyline) that connect three markers and this route is contineous but i want to display a route between two markers then what can i do.Give me sugessions...

Thanks &  Regards
Asif
Coordinator
Jan 21, 2009 at 1:20 PM
don't use GetRouteBetweenPoints, because it's returns point on the road, just manualy add two point:

List <PointLatLng> route = new List <PointLatLng>();
route.Add(start);
route.Add(end);

Route r1 = new Route(route, "test");
gMapControl1.AddRoute(r1);
Jan 22, 2009 at 5:47 AM
Hi Radioman,

            Thank you i updated my program with your code. Whatever i thought in initial stage i got it now.


Thanks & Regrads
Asif
Coordinator
Jan 22, 2009 at 5:54 AM
good ;}
Jan 23, 2009 at 9:45 AM
Hi Radioman,

        Marker m = new Marker(point, MarkerType.Medium, MarkerColor.Red);

In above code Marker Color is Red,Green,Blue or Yellow we nedd to use but how can i display my own colored marker like pink, cyan etc.... suggest me regarding this

Thanks & Regards
Asif

Jan 23, 2009 at 10:08 AM
Suggest using the System.Drawing.Colors  enum for the MarkerColor
Coordinator
Jan 23, 2009 at 10:37 AM
set marker.CustomMarker to your custom image and MarkerType to Custom, don't forget aligment
Jan 23, 2009 at 11:55 AM
Edited Jan 23, 2009 at 12:59 PM
Hi Radioman,

 I am not understanding. how i can set CustomMarker???? and whever i use the following line of code it is not displaying
the entire string on the marker.

For example

input string:-

string celno = "+919000443392";

but o/p it is displaying on the marker like this +91900044339

suggest regarding this...............................


Marker
m8 = new Marker(point, MarkerType.Medium, MarkerColor.Green );

m8.Text = celno.ToString ();

m8.Visible =

true;

 

gMapControl1.AddMarker(m8);

Thanks & Regards
Asif
Coordinator
Jan 23, 2009 at 12:24 PM
i'm just explained that ;}
Jun 6, 2009 at 7:42 AM

Hi Radioman,

  very very nice coding. thanks

  how can i use "Maps Icon" and where can i find them.

Coordinator
Jun 6, 2009 at 12:25 PM

check demo

May 16, 2010 at 7:13 AM

hello Programmers,

im new starting C# programing, i cant execution this project,

Error:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.CShorp.targets(132.9): the attribute "Returns" in element <target> is unrecognized

thanks

Coordinator
May 16, 2010 at 3:31 PM

;/ ??