Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into formatter2

Conflicts:
	package.json
  • Loading branch information...
commit bb04fc8a377ecdeecb2a183567a0a8d422598092 2 parents 77c922b + dc378b2
@tmcw tmcw authored
View
13 _posts/0100-01-01-CHANGELOG.md
@@ -14,13 +14,24 @@ title: Changelog
permalink: /docs/changelog
releases:
+- version: 0.6.2
+
+ notes:
+ - Fixed a bug that would prevent interactivity behavior from the first row in an imported CSV from working.
+ - Fixed a bug where highlighted syntax errors in the Carto editor would not show tooltips properly.
+ - Fixed a bug in the Mac app that would prevent some alert and confirmation dialogs from working properly.
+ - Fixed a bug in the Mac app where the user wouldn't be prompted to save their work at app quit time.
+ - Removed behavior in datasource panel that would force the SRS for certain file extensions.
+ - Custom SRS strings are supported for CSV files, but the default remains WGS84.
+ - More robust CSV parsing.
+
- version: 0.6.1
date: 2011-10-26
size: 61268451
sign: MCwCFFKfoN3MIscOoz4i5TsMfYrqizEsAhR2bLWoXnhwYQjQJx9wvNr85FCQMA==
notes:
- - Fixed several bugs with the Mac OS X interface that prevented the user from clicking links.
+ - Fixed several bugs with the Mac OS X interface that prevented the user from clicking links.
- version: 0.6.0
date: 2011-10-25
View
2  _posts/docs/tutorials/0200-01-01-mapnik-xml.md
@@ -13,7 +13,7 @@ In TileMill >= 0.4.x you can access the Mapnik XML for each project within the a
![](/tilemill/assets/pages/mapnikxml.png)
-You can also do this programmatic on the command line using the carto command line tool.
+You can also script this using the carto command line tool.
You can install carto with [npm](http://npmjs.org/), which depends on nodejs, by doing:
View
12 models/Datasource.server.bones
@@ -36,8 +36,16 @@ models.Datasource.prototype.sync = function(method, model, success, error) {
var features = [];
if (options.features) {
var featureset = source.featureset();
- for (var i = 0, feat; i < 1000 && (feat = featureset.next(true)); i++) {
- features.push(feat.attributes());
+ for (var i = 0, feat;
+ i < 1000 && (feat = featureset.next(true));
+ i++) {
+ var f = feat.attributes();
+ for (k in f) {
+ if (typeof f[k] === 'string') {
+ f[k] = _.escape(f[k]);
+ }
+ }
+ features.push(f);
}
}
View
10 package.json
@@ -1,6 +1,6 @@
{
"name": "tilemill",
- "version": "0.6.1",
+ "version": "0.6.2",
"main": "./tilemill.js",
"description": "A modern map design studio.",
"keywords": ["map", "design", "cartography"],
@@ -22,7 +22,7 @@
"licenses": [{ "type": "BSD" }],
"dependencies": {
"backbone-dirty": "1.1.x",
- "bones": "1.3.19",
+ "bones": "1.3.21",
"chrono": "~1.0.1",
"JSV": "3.5.x",
"mbtiles": "https://github.com/mapbox/node-mbtiles/tarball/formatter2",
@@ -31,11 +31,11 @@
"step": "0.0.x",
"tilelive": "~4.0.3",
"mapnik": "~0.5.8",
- "millstone": "~0.2.0",
+ "millstone": "~0.2.2",
"sphericalmercator": "~1.0.1",
"tilelive-mapnik": "~0.2.0",
- "underscore": "1.1.x",
- "carto": "~0.4.2",
+ "underscore": "1.2.x",
+ "carto": "~0.4.3",
"wax": "https://github.com/mapbox/wax/tarball/master",
"node-markdown": "0.1.0",
"sqlite3": "~2.0.16"
View
2  platforms/osx/PACKAGE.md
@@ -132,7 +132,7 @@ To set up the SDK and build mapnik do:
curl -o sources.tar.bz2 http://dbsgeo.com/tmp/mapnik-static-sdk-2.1.0-dev_r1.tar.bz2
tar xvf sources.tar.bz2
cd ../
- ./configure JOBS=`sysctl -n hw.ncpu`
+ ./configure JOBS=`sysctl -n hw.ncpu` (If you have problems with Clang, add "CC=gcc CXX=g++" as well.)
make
make install
View
5 platforms/osx/TileMillAppDelegate.m
@@ -103,6 +103,11 @@ - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisible
return YES;
}
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
+{
+ return ([self.browserController browserShouldQuit] ? NSTerminateNow : NSTerminateCancel);
+}
+
- (void)applicationWillTerminate:(NSNotification *)notification
{
[[NSUserDefaults standardUserDefaults] synchronize];
View
1  platforms/osx/TileMillBrowserWindowController.h
@@ -18,5 +18,6 @@
- (void)loadInitialRequest;
- (void)loadRequestURL:(NSURL *)loadURL;
+- (BOOL)browserShouldQuit;
@end
View
33 platforms/osx/TileMillBrowserWindowController.m
@@ -13,6 +13,8 @@
@interface TileMillBrowserWindowController ()
- (void)promptToSaveRemoteURL:(NSURL *)remoteURL revealingInFinder:(BOOL)shouldReveal;
+- (NSString *)runJavaScript:(NSString *)code;
+- (NSString *)runJavaScript:(NSString *)code inBones:(BOOL)useBones;
@property (nonatomic, assign) BOOL initialRequestComplete;
@@ -49,6 +51,24 @@ - (void)loadRequestURL:(NSURL *)loadURL
[self.webView.mainFrame loadRequest:[NSURLRequest requestWithURL:loadURL]];
}
+- (BOOL)browserShouldQuit
+{
+ // check for unsaved work
+ //
+ [self runJavaScript:@"var loseUnsavedWork;"];
+ [self runJavaScript:@"var getLoseUnsavedWork = function() { return loseUnsavedWork; }"];
+ [self runJavaScript:@"loseUnsavedWork = views.Project.prototype.unload({type: 'unload'})" inBones:YES];
+
+ if ([[self runJavaScript:@"getLoseUnsavedWork();"] isEqualToString:@"false"])
+ {
+ [self.window makeKeyAndOrderFront:self];
+
+ return NO;
+ }
+
+ return YES;
+}
+
- (void)promptToSaveRemoteURL:(NSURL *)remoteURL revealingInFinder:(BOOL)shouldReveal;
{
NSSavePanel *savePanel = [NSSavePanel savePanel];
@@ -71,6 +91,19 @@ - (void)promptToSaveRemoteURL:(NSURL *)remoteURL revealingInFinder:(BOOL)shouldR
}];
}
+- (NSString *)runJavaScript:(NSString *)code
+{
+ return [self runJavaScript:code inBones:NO];
+}
+
+- (NSString *)runJavaScript:(NSString *)code inBones:(BOOL)useBones
+{
+ if (useBones)
+ code = [NSString stringWithFormat:@"window.Bones.initialize(function(models, views, controllers) { %@ });", code];
+
+ return [self.webView stringByEvaluatingJavaScriptFromString:code];
+}
+
#pragma mark -
#pragma mark WebPolicyDelegate
View
2  platforms/ubuntu/install-tilemill.sh
@@ -20,7 +20,7 @@ if [ -z "$DIST" ]; then
exit
fi
-if [[ "$DIST" != "maverick" && "$DIST" != "natty" ]]; then
+if [[ "$DIST" != "maverick" && "$DIST" != "natty" && "$DIST" != "oneiric" ]]; then
echo "Your distribution $DIST is not supported."
exit
fi
View
32 views/Layer.bones
@@ -10,9 +10,7 @@ view.prototype.events = {
'change input[name=file], input[name=connection]': 'favoriteUpdate',
'click a[href=#cacheFlush]': 'cacheFlush',
'change select[name=srs-name]': 'nameToSrs',
- 'keyup input[name=srs]': 'srsToName',
- 'keyup input[name=file]': 'srsForce',
- 'change input[name=file]': 'srsForce'
+ 'keyup input[name=srs]': 'srsToName'
};
view.prototype.initialize = function(options) {
@@ -27,8 +25,7 @@ view.prototype.initialize = function(options) {
'favoriteUpdate',
'cacheFlush',
'nameToSrs',
- 'srsToName',
- 'srsForce'
+ 'srsToName'
);
this.favorites = options.favorites;
this.render();
@@ -72,31 +69,6 @@ view.prototype.srsToName = function(ev) {
el.siblings('select[name=srs-name]').val(this.model.srsName(srs));
};
-// Force KML sources to use `WGS84` as their SRS. Actual SRS
-// enforcement occurs upstream in `millstone`.
-view.prototype.srsForce = function(ev) {
- var uri = $(ev.currentTarget).val();
- var form = $(ev.currentTarget).parents('form');
- var matches = uri.match(/.(\w+)$/) || [''];
- switch (matches[0]) {
- case '.kml':
- case '.csv':
- case '.tsv':
- case '.txt':
- case '.rss':
- case '.geojson':
- case '.json':
- $('select[name=srs-name], input[name=srs]', form).attr('disabled', true);
- $('select[name=srs-name]', form).val('autodetect').change();
- $('input[name=srs]', form).val('');
- break;
- default:
- $('select[name=srs-name], input[name=srs]', form).attr('disabled', false);
- $('select[name=srs-name]', form).change();
- break;
- }
-};
-
view.prototype.favoriteToggle = function(ev) {
var form = $(ev.currentTarget).parents('form');
var uri = $('input[name=file], input[name=connection]', form).val();
Please sign in to comment.
Something went wrong with that request. Please try again.