BIOSTALL / CodeIgniter-Google-Maps-V3-API-Library

The library enables you to create a map and overlay multiple markers, polylines, polygons, rectangles, ground overlays and/or circles, all of which are fully customisable. The library also supports showing directions between two points, including the ability to show the textual directions alongside the map too, and marker clustering. The first stages of integration with the Google Places API are available for use too.
http://biostall.com/codeigniter-google-maps-v3-api-library
288 stars 199 forks source link

Change directions marker icon #62

Closed rifkysyaripudin closed 7 years ago

rifkysyaripudin commented 7 years ago

Halo, how to change default icon directions with my icon?

rifkysyaripudin commented 7 years ago

Done. I modified library after directionsDisplay.setDirections(response); adding code

 if ($this->directionsStartIcon) {
                $this->output_js_contents .= 'createMarker_' . $this->map_name . '({position: leg.start_location, icon: "' . $this->directionsStartIcon . '", map: ' . $this->map_name . '});';
            }
            if ($this->directionsEndIcon) {
                $this->output_js_contents .= 'createMarker_' . $this->map_name . '({position: leg.end_location, icon: "' . $this->directionsEndIcon . '", map: ' . $this->map_name . '});';
            }