On Tue, Mar 24, 2009 at 1:11 PM, sureshT suri <[email protected]>wrote:
> Hi,
>
> Idea is good..!.
> Below is my coding.Let me precise explaination
> Hear is my c# code where i am encoding the more than 60,000 points using
> polylineEncoder class.
> i am storing the encoded string value into a hidden text box and from there
> passing to the javascript.
> textbox name is "txtEncoded" which is mentioned down in the code.
>
> *Point :1*
>
> Tracking
> objTracking = (Tracking)arrayTrackingObjects;
>
> PolylineEncoder encoder = new PolylineEncoder();
>
> List<Trackpoint> trackPoints = new List<Trackpoint>();
>
> Trackpoint tp;
>
> GooglePoint gp1 = new GooglePoint();
>
> for (int i = 0; i < objTracking.intNoofDataPoint; i++)
>
> {
>
> tp =
> new Trackpoint(objTracking.Latitude[i], objTracking.Longitude[i]);
>
> trackPoints.Add(tp);
>
> }
>
> txtEncoded.Value = encoder.Encode(trackPoints).Points;
>
> HtmlGenericControl dispval = new HtmlGenericControl();
>
> dispval.InnerHtml =
> "<script language='javascript'> loadEarth(" + objTracking.Latitude[0] +
> "," + objTracking.Longitude[0] + ");</script>";
>
> Page.Controls.Add(dispval);
>
>
>
> Point : 2
>
> Javascript function
>
> function
> loadEarth(Lati,Longi)
>
> {
>
> var mapdiv=document.getElementById("map");
>
> mapdiv.style.width=
> "830px";
>
> mapdiv.style.height=
> "600px";
>
> var geocoder = new GClientGeocoder();
>
> geocoder.setCache=
> null;
>
> // Google Maps caches KML files -- use a random query string parameter set
> to Date.
>
> var url_end = "?nocache=" + (new Date()).valueOf();
>
> var kmlFile = "http://124.123.50.236/kml/my-vacation-photos.kml";
>
> var map = new GMap2(document.getElementById("map"));
>
> // mapdiv.load("from: " + fromAddress + " to: " +
> toAddress,{locale:"en_au", travelMode:G_TRAVEL_MODE_WALKING});
>
> // Add controls
>
> map.addControl(
> new GLargeMapControl());
>
> map.addControl(
> new GMapTypeControl());
>
> geoxml =
> new GGeoXml(kmlFile);
>
> map.addOverlay(geoxml);
>
> var strEncod=document.getElementById('<%= txtEncoded.ClientID %>').value;
>
> map.addControl(
> new GMapTypeControl());
>
> map.addControl(
> new GSmallMapControl());
>
> var marker = new GMarker(new GLatLng(Lati,Longi));
>
> map.setCenter(
> new GLatLng(Lati,Longi),14);
>
> //GEvent.addListener(marker, "click", function() {
>
> //marker.openInfoWindowHtml("hii");});
>
> map.addOverlay(marker);
>
> map.setCenter(
> new GLatLng(Lati,Longi), 13);
>
> map.setMapType(G_NORMAL_MAP);
>
> var polyline = GPolyline.fromEncoded({
>
> color:
> 'Green',
>
> weight: 6,
>
> opacity: 0.6,
>
> points: strEncod,
>
> levels:
> 'PMP',
>
> numLevels: 18,
>
> zoomFactor: 1
>
> });
>
> map.addOverlay(polyline);
>
> }
>
> This is what i am using.Let me now if you any doubts or you can come to
> online for chat.My id is [email protected]
>
>
>
> suri
>
> On Tue, Mar 24, 2009 at 12:14 PM, Tamer Hatoum <
> [email protected]> wrote:
>
>>
>> Hi
>> I have build the same application using a tracking devices also in c#.net.
>> so
>> we can cooperate to get a perfect job. send me your tracking javascript
>> and I
>> will make for you the finishing points.
>> and I will give you a hint ;you have to prepare defferent icons for every
>> directions..
>> and do as the following :
>> var ppgicon = new IIcon();
>>
>> if(22.5 < direction && direction < 67.5)
>> {
>> strimg='img/car_45.png';
>> }
>> else if (67.5 < direction && direction < 112.5)
>> {
>> strimg= 'img/car_90.png';
>> }........................
>>
>>
>> sureshT suri <[email protected]> wrote:
>>
>> > Hi,
>> >
>> > You are on the right track.I have written the code to track a vehicle
>> using
>> > the points in the database,using c#.net.I am successfully able to plot
>> the
>> > path on the map but i can't able to give the directions for that.
>> > I am sending you the sample pic of my problem.
>> >
>> > thanks in advance
>> >
>> > On Tue, Mar 24, 2009 at 11:49 AM, Tamer Hatoum <
>> > [email protected]> wrote:
>> >
>> > >
>> > > hello:
>> > > Can I know how u get that points I mean from where?
>> > > Couse I have already a javascript for the direction of icons but the
>> > > directions must be also stored in the data base.
>> > > means if these points are being stored from a tracking devices so you
>> can
>> > > get
>> > > also the direction and then get my javascript to browse your way.
>> > > can we get a link just to see what you mean exactly..
>> > > "[email protected]" <[email protected]> wrote:
>> > >
>> > > >
>> > > > On Mar 23, 10:33 pm, sureshT suri <[email protected]>
>> wrote:
>> > > > > Hi frnds,
>> > > > >
>> > > > > i have some 60,000 points(latitude and longitude) in my
>> database,using
>> > > > > encoding concept i am showing the path on the google map. It
>> showing
>> > > the
>> > > > > path nicely but i am not able to show the direction where its
>> starts
>> > > and
>> > > > > where its going.
>> > > > > Can any one please send me the code for my requirements.
>> > > >
>> > > > I suspect you are going to have to write it yourself...
>> > > >
>> > > > If you post a link to your map with an explanation of what the
>> problem
>> > > > you are having and how to reproduce it, someone may be able to guide
>> > > > you in the right direction.
>> > > >
>> > > >
>> > > > -- Larry
>> > > >
>> > > > >
>> > > > > Thanks in advance
>> > > > > suri
>> > > > >
>> > > > > On Tue, Mar 24, 2009 at 3:17 AM, Bill Chadwick <
>> > > > >
>> > > > > [email protected]> wrote:
>> > > > >
>> > > > > > Not quite sure what you are after. Is this
>> > > > > >http://wheresthepath.googlepages.com/arrowline.htm
>> > > > > > of interest ?
>> > > > >
>> > > > > > On Mar 23, 12:04 pm, Ralph Ames <[email protected]> wrote:
>> > > > > > > >i want to show arrows to my directions in google map.
>> > > > > > > >Please any one can provide me the code for that in javascript
>> > > > >
>> > > > > > > Try Mike's tutorialhttp://econym.org.uk/gmap/
>> > > > >
>> > > > > > > Ralph
>> > > > >
>> > > >
>> > > Tamer Hatoum;
>> > > Web Developer and Programmer;
>> > > Qatar Navigator Est;
>> > > Tel: +974 6026267;
>> > > [email protected]
>> > >
>> > >
>> > >
>> > > >
>> > >
>> >
>> > >
>> >
>> Tamer Hatoum;
>> Web Developer and Programmer;
>> Qatar Navigator Est;
>> Tel: +974 6026267;
>> [email protected]
>>
>>
>>
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---