|
Hi radioman.It,
Thanks for your article. We have a server-client application. We r downloading some locations from server to client and showing google map on client ( wpf application). Locations are shown as markers and when user click on marker, streetView is shown.
Everything is working fine. I added zoom functionality for the streetView by adjusting z coordinate of location property of PerspectiveCamera.
Your article was a huge huge help, otherwise I will have to use webBrowser control.
Thanks,
Veena
|
|
|
|
|
happy to hear it
peace & serenity
|
|
|
|
|
Hi radioman.lt,
Thanks for all your help.
Is there any way, we can add StreetView functionality using GMap.net.
Thanks,
Veena
|
|
|
|
|
there is testing project using wpf in svn
peace & serenity
|
|
|
|
|
I am so sorry, Now I found it.
Thanks,
Veena
|
|
|
|
|
Hi,
I am interersted in getting direction from one marker to another.
Can not figure out how to do that?
Thanks
Veena
|
|
|
|
|
there is patch for directions in cp
peace & serenity
|
|
|
|
|
|
First of all thank you for such a good article and project.
Can you please look at the below error in the code
Error in the file Gmap.cs and method name is GetRouteBetweenPointsKmlUrl
Error Line XmlSerializer serializer = new XmlSerializer(typeof(KmlType));
Complete error message
"System.InvalidOperationException: There was an error reflecting type 'KmlType'. ---> System.InvalidOperationException: There was an error reflecting property 'NetworkLinkControl'. ---> System.InvalidOperationException: There was an error reflecting type 'NetworkLinkControlType'. ---> System.InvalidOperationException: There was an error reflecting property 'Update'. ---> System.InvalidOperationException: There was an error reflecting type 'UpdateType'. ---> System.InvalidOperationException: There was an error reflecting property 'Items'. ---> System.InvalidOperationException: There was an error reflecting type 'DeleteType'. ---> System.InvalidOperationException: There was an error reflecting property 'Items'. ---> System.InvalidOperationException: There was an error reflecting type 'NetworkLinkType'. ---> System.InvalidOperationException: There was an error reflecting property 'Item'. ---> System.InvalidOperationException: Member NetworkLinkType.Item of type LinkType hides base class member AbstractFeatureType
.Item of type System.Object. Use XmlElementAttribute or XmlAttributeAttribute to specify a new name.\r\n at System.Xml.Serialization.StructMapping.FindDeclaringMapping(MemberMapping member, StructMapping& declaringMapping, String parent)\r\n at System.Xml.Serialization.StructMapping.Declares(MemberMapping member, String parent)\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns,
ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n
at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolea
n rpc, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limit
er)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel mod
el, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportF
ieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n --- End of inner exception stack trace ---\r\n at System.Xml.Serialization.XmlReflectionImporter.Import
TypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter)\r\n at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)\r\n at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)\r\n at System.Xml.Serialization.XmlSerializer..ctor(Type type)\r\n at GMap.NET.GMaps.GetRouteBetweenPointsKmlUrl(String url) in \\Trunk\\GMap.NET.Core\\GMap.NET\\GMaps.cs:line 903"
modified on Thursday, August 27, 2009 3:55 AM
|
|
|
|
|
the original Serializer do not work as expected, it is know issue, you can look at patch page there is manual deserializator for that now
peace & serenity
|
|
|
|
|
Thank you for your replay. I am using KMLRoute.cs for routing the locations from the patch.
|
|
|
|
|
Hay Dear,
Thank you for share such a good article. I am working with GMap and every time i load a map in gmapcontrol it will give me an error "we are sorry, but we don't have imagery at this Zoom level for this region".
Please help me out i tried both windows and wfp.
Thankx
Kashif Usman
|
|
|
|
|
use newest version in codeplex, i can't udpade demo in this article because of stupid moderators, they locked my article, is it still my article or theirs?
peace & serenity
|
|
|
|
|
thanks and don't worry its still yours. I will check on codeplex.
|
|
|
|
|
Hi,
I got the control working on a form just fine no problems. What I wanted to do was create a mapping Service that runs on a server as a service. This means using a GMAP object in a class that is not a form; The idea is that the GMAP object writes to a bitmap and I send this to my clients.
The completed event is hooked up to TileLoadCompleted event. When using the GMAP without a form, the events do not fire and the map is black.
I tried everything I can think of, even making sure that I am running the StartUp code that runs on the On_Load event of the GMAP_4 windows Forms code. This still doesn't work.
What do I need to do to make it go get the map? Maybe I need to write my own wrapper for the core? I was hoping to use the GMAP Forms without modification.
|
|
|
|
|
i shall investigate in that
peace & serenity
|
|
|
|
|
Hey, Brilliant!
I tried lots of things to get it to work but I failed
I guess if we could create a quick demo app that can say grab a (500x500) pixel map from keywords "Birmingham, UK" from a console app and save it to a bitmap?
|
|
|
|
|
definitely!
peace & serenity
|
|
|
|
|
I still didn't get this to work, I found that the reason I got black bitmap was possibly related to the thread 'lock' on the redrawmap(). If you move redraw map to your form load event rather that the control.OnLoad event the same thing happens. if you create a seperate thread to fire reloadmap then it works (Just as a test).
But I still cannot get the control to behave in a class that is not a form.
Any Other Ideas?
|
|
|
|
|
we need to glue separate tiles thats all, calculate region you want, get tiles, and glue them together into one image, i'll try to do that now
peace & serenity
|
|
|
|
|
|
I knew you'd know where to find all the bits! So whats the secret then? Is it on the SVN codeplex?
|
|
|
|
|
yes
peace & serenity
|
|
|
|
|
I couldn't get it to work, until I copied the TilePrefetcher into the forms folder for some reason, and then build. Then it works fine I think this is because I don't use SVN properly.
Its deceptively simple...
You even put the scale on and drew a rectangle round it!
Presumably then, all I need to do is get the area from a keyword via the GMAPS thing and then it will work with any location.
Good stuff.
|
|
|
|
|
definitely, and you can use high zoom and different maps to get high resolution images
peace & serenity
|
|
|
|
|