diff -dPNur HappyCamel.current/cli.py HappyCamel/cli.py --- HappyCamel.current/cli.py 2013-08-27 05:13:35.000000000 +0200 +++ HappyCamel/cli.py 2013-09-24 19:46:02.000000000 +0200 @@ -257,6 +257,10 @@ var = "show_waypoints", default = defaults["show_waypoints"], help = "Show the waypoints in the KMZ file. Currently set to %default.") + parser.addOption("--google-maps", type = "bool", bool_action = True, + var = "for_google_maps", + default = defaults["for_google_maps"], + help = "Generate for google-maps. Currently set to %default.") # The options relating to image parsing parser.addHelpRule("\nUsually, metadata is read through the internal library, but written through the external Exiftool command. Using Exiftool is much slower, but using the internal library for writing carries some risk as it is not as mature.\nThe following options influence this behavior:") @@ -333,6 +337,7 @@ options["between_color"] = False options["between_width"] = False options["show_waypoints"] = False + options["for_google_maps"]= True # Check if the user specified any photo's if (len(args) < 1) and not (options["report_times"] or options["save_config"]): diff -dPNur HappyCamel.current/config.py HappyCamel/config.py --- HappyCamel.current/config.py 2013-08-27 05:13:35.000000000 +0200 +++ HappyCamel/config.py 2013-09-24 19:46:49.000000000 +0200 @@ -77,6 +77,7 @@ "between_color": [str, "KMZ File", "Between color", "60ffffff"], "between_width": [float, "KMZ File", "Between width", 2.0], "show_waypoints": [bool, "KMZ File", "Show waypoints", False], + "for_google_maps": [bool, "KMZ File", "Generate for Google Maps", True], "order": [str, "KMZ File", "Order", "D"], "image_size": [int, "KMZ File", "Pixels", 200], "icon_size": [int, "KMZ File", "Icon pixels", 0], diff -dPNur HappyCamel.current/kmlhandler.py HappyCamel/kmlhandler.py --- HappyCamel.current/kmlhandler.py 2013-08-27 05:13:35.000000000 +0200 +++ HappyCamel/kmlhandler.py 2013-09-24 19:53:49.000000000 +0200 @@ -59,7 +59,7 @@ self.between_tracks_width = between_tracks_width def writeKML(self, out_fp, write_photos = True, write_waypoints = True, - write_track = True, write_between_tracks = True): + write_track = True, write_between_tracks = True, for_google_maps = True): """ Write a KML file to the specified file pointer out_fp. The arguments specify which parts of the file should be included. If write_photos is True, thumbnails should be included. If write_waypoints is True, @@ -80,7 +80,7 @@ if (write_photos): self.logger.debug("Writing photo folder") - self.writePhotos(out_fp) + self.writePhotos(out_fp, for_google_maps) if (write_waypoints): self.logger.debug("Writing waypoints folder") @@ -92,7 +92,7 @@ out_fp.write('\n') - def writePhotos(self, out_fp): + def writePhotos(self, out_fp, for_google_maps): """ Write the photo references with comments and stuff to the file pointer out_fp . """ @@ -116,10 +116,9 @@ out_fp.write('\n') out_fp.write(' Images\n') # Write each thumbnail as a placemark + for photo in self.photo_list: if (photo in self.thumbnail_names): # Only process if there's a thumbnail - location = photo.getLocation() - if (self.use_icons): out_fp.write(' \n') + for photo in self.photo_list: + if (photo in self.thumbnail_names): # Only process if there's a thumbnail + location = photo.getLocation() + out_fp.write(' \n') out_fp.write(' %s\n' % photo.getName()) out_fp.write(' %s\n' % photo.getName()) if (self.use_icons): - out_fp.write(' #photo_%s\n' % self.thumbnail_names[photo]) + if (for_google_maps): + out_fp.write(' \n') + else: + out_fp.write(' #photo_%s\n' % self.thumbnail_names[photo]) else: - out_fp.write(' #photo_mark\n') + out_fp.write(' #photo_mark\n') out_fp.write(' \n') if (location[2]): out_fp.write(' clampToGround\n') @@ -202,7 +218,7 @@ # Write the actual waypoints for waypoint in waypoints: out_fp.write(' \n' % waypoint[3]) - out_fp.write(' waypoint_style\n') + out_fp.write(' #waypoint_style\n') out_fp.write(' \n') out_fp.write(' %.5f,%.5f,%.3f\n' % (waypoint[1], waypoint[0], (waypoint[2] or 0))) out_fp.write(' \n') @@ -399,7 +415,7 @@ self.logger.error("Couldn't make a thumbnail of image %s." % photo.getName()) def writeFile(self, write_photos = False, write_waypoints = False, - write_track = False, write_between_tracks = False): + write_track = False, write_between_tracks = False, for_google_maps = True): """ Write the KMZ file. The arguments specify which parts of the file should be included. If write_photos is True, thumbnails should be included. If write_waypoints is True, waypoints should be included. If write_track @@ -440,7 +456,7 @@ self.between_tracks_color, self.between_tracks_width, self.photos_clickable, self.photos_url, bool(self.icon_size)) kml_fp = StringIO.StringIO() - kml.writeKML(kml_fp, write_photos, write_waypoints, write_track, write_between_tracks) + kml.writeKML(kml_fp, write_photos, write_waypoints, write_track, write_between_tracks, for_google_maps) # Write the KML file to the ZIP archive out_file.writestr("base.kml", kml_fp.getvalue()) diff -dPNur HappyCamel.current/main.py HappyCamel/main.py --- HappyCamel.current/main.py 2013-08-27 05:13:35.000000000 +0200 +++ HappyCamel/main.py 2013-09-24 19:50:50.000000000 +0200 @@ -264,7 +264,8 @@ self.conf.get("url"), self.conf.get("show_waypoints"), self.conf.get("show_track"), - self.conf.get("show_between_tracks")) + self.conf.get("show_between_tracks"), + self.conf.get("for_google_maps")) def getLocSources(self, input_list): """ Build and return a GeoSources instance with all possible sources of @@ -533,7 +534,7 @@ def writeKMZFile(self, gpx_files, photo_list, file_path, order, image_size, icon_size, title, track_color, track_width, between_color, between_width, clickable, photos_url, show_waypoints, show_track, - show_between_tracks): + show_between_tracks, for_google_maps): """ Write the KMZ file with the specified options. """ @@ -543,5 +544,5 @@ kmz.writeFile(write_photos = True, write_waypoints = show_waypoints, write_track = show_track, - write_between_tracks = show_between_tracks) + write_between_tracks = show_between_tracks, for_google_maps = for_google_maps)