original_string: function getAddMarkersJS($map_id = "", $pano= false) {
  		//defaults
  		if($map_id == ""){
  			$map_id = $this->map_id;
  		}
  		
  		if($pano==false){
  			$_prefix = "map";
  		}else{
  			$_prefix = "panorama".$this->street_view_dom_id;
  		}
          $_output = '';
          foreach($this->_markers as $_marker) {
              $iw_html = str_replace('"','\"',str_replace(array("\n", "\r"), "", $_marker['html']));
              $_output .= "var point = new google.maps.LatLng(".$_marker['lat'].",".$_marker['lon'].");\n";
              $_output .= sprintf('%s.push(createMarker(%s%s, point,"%s","%s", %s, %s, "%s", %s ));',
  				(($pano==true)?$_prefix:"")."markers".$map_id,
  				$_prefix,                
  				$map_id,
  				str_replace('"','\"',$_marker['title']),
  				str_replace('/','\/',$iw_html),
  				(isset($_marker["icon_key"]))?"icon".$map_id."['".$_marker["icon_key"]."'].image":"''",
  				(isset($_marker["icon_key"])&&isset($_marker["shadow_icon"]))?"icon".$map_id."['".$_marker["icon_key"]."'].shadow":"''",
  				(($this->sidebar)?$this->sidebar_id:""),
  				((isset($_marker["openers"])&&count($_marker["openers"])>0)?json_encode($_marker["openers"]):"''")
              ) . "\n";
          }
          
          if($this->marker_clusterer && $pano==false){//only do marker clusterer for map, not streetview
          	$_output .= "
          	   markerClusterer".$map_id." = new MarkerClusterer(".$_prefix.$map_id.", markers".$map_id.", {
  		          maxZoom: ".$this->marker_clusterer_options["maxZoom"].",
  		          gridSize: ".$this->marker_clusterer_options["gridSize"].",
  		          styles: ".$this->marker_clusterer_options["styles"]."
  		        });
  		        	
          	";
          }
          return $_output;
      }
code: function getAddMarkersJS($map_id = "", $pano= false) {
  		//defaults
  		if($map_id == ""){
  			$map_id = $this->map_id;
  		}
  		
  		if($pano==false){
  			$_prefix = "map";
  		}else{
  			$_prefix = "panorama".$this->street_view_dom_id;
  		}
          $_output = '';
          foreach($this->_markers as $_marker) {
              $iw_html = str_replace('"','\"',str_replace(array("\n", "\r"), "", $_marker['html']));
              $_output .= "var point = new google.maps.LatLng(".$_marker['lat'].",".$_marker['lon'].");\n";
              $_output .= sprintf('%s.push(createMarker(%s%s, point,"%s","%s", %s, %s, "%s", %s ));',
  				(($pano==true)?$_prefix:"")."markers".$map_id,
  				$_prefix,                
  				$map_id,
  				str_replace('"','\"',$_marker['title']),
  				str_replace('/','\/',$iw_html),
  				(isset($_marker["icon_key"]))?"icon".$map_id."['".$_marker["icon_key"]."'].image":"''",
  				(isset($_marker["icon_key"])&&isset($_marker["shadow_icon"]))?"icon".$map_id."['".$_marker["icon_key"]."'].shadow":"''",
  				(($this->sidebar)?$this->sidebar_id:""),
  				((isset($_marker["openers"])&&count($_marker["openers"])>0)?json_encode($_marker["openers"]):"''")
              ) . "\n";
          }
          
          if($this->marker_clusterer && $pano==false){//only do marker clusterer for map, not streetview
          	$_output .= "
          	   markerClusterer".$map_id." = new MarkerClusterer(".$_prefix.$map_id.", markers".$map_id.", {
  		          maxZoom: ".$this->marker_clusterer_options["maxZoom"].",
  		          gridSize: ".$this->marker_clusterer_options["gridSize"].",
  		          styles: ".$this->marker_clusterer_options["styles"]."
  		        });
  		        	
          	";
          }
          return $_output;
      }
code_tokens: function getAddMarkersJS ( $ map_id = "" , $ pano = false ) { //defaults if ( $ map_id == "" ) { $ map_id = $ this -> map_id ; } if ( $ pano == false ) { $ _prefix = "map" ; } else { $ _prefix = "panorama" . $ this -> street_view_dom_id ; } $ _output = '' ; foreach ( $ this -> _markers as $ _marker ) { $ iw_html = str_replace ( '"' , '\"' , str_replace ( array ( "\n" , "\r" ) , "" , $ _marker [ 'html' ] ) ) ; $ _output .= "var point = new google.maps.LatLng(" . $ _marker [ 'lat' ] . "," . $ _marker [ 'lon' ] . ");\n" ; $ _output .= sprintf ( '%s.push(createMarker(%s%s, point,"%s","%s", %s, %s, "%s", %s ));' , ( ( $ pano == true ) ? $ _prefix : "" ) . "markers" . $ map_id , $ _prefix , $ map_id , str_replace ( '"' , '\"' , $ _marker [ 'title' ] ) , str_replace ( '/' , '\/' , $ iw_html ) , ( isset ( $ _marker [ "icon_key" ] ) ) ? "icon" . $ map_id . "['" . $ _marker [ "icon_key" ] . "'].image" : "''" , ( isset ( $ _marker [ "icon_key" ] ) && isset ( $ _marker [ "shadow_icon" ] ) ) ? "icon" . $ map_id . "['" . $ _marker [ "icon_key" ] . "'].shadow" : "''" , ( ( $ this -> sidebar ) ? $ this -> sidebar_id : "" ) , ( ( isset ( $ _marker [ "openers" ] ) && count ( $ _marker [ "openers" ] ) > 0 ) ? json_encode ( $ _marker [ "openers" ] ) : "''" ) ) . "\n" ; } if ( $ this -> marker_clusterer && $ pano == false ) { //only do marker clusterer for map, not streetview $ _output .= "
          	   markerClusterer" . $ map_id . " = new MarkerClusterer(" . $ _prefix . $ map_id . ", markers" . $ map_id . ", {
  		          maxZoom: " . $ this -> marker_clusterer_options [ "maxZoom" ] . ",
  		          gridSize: " . $ this -> marker_clusterer_options [ "gridSize" ] . ",
  		          styles: " . $ this -> marker_clusterer_options [ "styles" ] . "
  		        });
  		        	
          	" ; } return $ _output ; }
docstring: overridable function for generating js to add markers
docstring_tokens: overridable function for generating js to add markers