Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i want to draw vector paths on the the google map with javascript

    i want to draw vector paths on the the google map on my site that I want to add moving vehicles on the roads and i want to zoom the map

    when the cars going somewhere. Can I do it? I do not want to take a screenshot of the google map adress. here is my javascript codes.Do

    you have an idea about google map zooming with animations?


    var options = {
    controls: {
    panControl: true,
    zoomControl: true,
    mapTypeControl: true,
    scaleControl: true,
    streetViewControl: true,
    overviewMapControl: true
    },
    scrollwheel: true,
    maptype: 'TERRAIN',
    markers: [
    {
    latitude: -2.2014,
    longitude: -80.9763,
    },
    {
    address: "Guayaquil, Ecuador",
    html: "My Hometown",
    icon: {
    image: "images/gmap_pin_grey.png",
    iconsize: [26, 46],
    iconanchor: [12,46]
    }
    }
    ],
    icon: {
    image: "http://www.mobilyala.com/mapfiles/marker.png",
    iconsize: [37, 34],
    shadowsize: [37, 34],
    iconanchor: [9, 34],
    shadowanchor: [19, 34]
    },
    latitude: -2.282,
    longitude: -80.272,
    zoom: 10
    }
    Last edited by dekorasyon; 05-17-2012 at 08:04 AM.

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,981
    Thanks
    56
    Thanked 557 Times in 554 Posts
    here is an example of one marker moving along a line created by the directions service. If you want to plot your own lines you will have to create polylines, feed them to the function and, if all the markers are in movement, have a way to decide which marker the map "follows" and zooms on


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •