Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.

Mapnik omnivore refactor #1199

Closed
wants to merge 14 commits into from
Closed

Mapnik omnivore refactor #1199

wants to merge 14 commits into from

Conversation

GretaCB
Copy link
Contributor

@GretaCB GretaCB commented Feb 19, 2015

Prep Studio for integrating the new mapnik-omnivore refactor

@springmeyer
Copy link
Contributor

will this address #1156?

@GretaCB
Copy link
Contributor Author

GretaCB commented Feb 23, 2015

@springmeyer Yes. Studio no longer directly calls any mapnik-omnivore functions, so this error shouldn't happen anymore. Also, added some error handling for the mapnik call.

@springmeyer
Copy link
Contributor

@GretaCB what value does this commit add? f241d39. To me that just catches the Mapnik error and throws another. I'm biased, but personally I'd like to see the Mapnik error reported since it may contain helpful details to know what went wrong.

@GretaCB
Copy link
Contributor Author

GretaCB commented Feb 23, 2015

Good point. Will pass in the caught error.

On Mon, Feb 23, 2015 at 2:57 PM, Dane Springmeyer [email protected]
wrote:

@GretaCB https://github.com/GretaCB what value does this commit add?
f241d39
f241d39.
To me that just catches the Mapnik error and throws another. I'm biased,
but personally I'd like to see the Mapnik error reported since it may
contain helpful details to know what went wrong.


Reply to this email directly or view it on GitHub
#1199 (comment).

@GretaCB
Copy link
Contributor Author

GretaCB commented Feb 27, 2015

@samanpwbb @springmeyer This is ready to merge. What is the process for deploy/release?

cc @rclark

@wilhelmberg
Copy link
Contributor

My 2 cents concerning f241d39

If I decide to catch an error and re-throw (happens rarely, most of the time to do some extra error logging), then I like to include the original error plus some additional information to provide more context and make debugging/error hunting easier, e.g.:

throw new Error(util.format(
    'Could not load datasource "%s" for layer "%s": %s'
    , opts
    , l.id
    , err
));

I'm not familiar with the style rules of this code base and haven't checked if there is a general catch somewhere, but maybe that's what @springmeyer meant, too.

@springmeyer
Copy link
Contributor

@samanpwbb @springmeyer This is ready to merge. What is the process for deploy/release?

Because this a fairly big upgrade I think it would be worth testing the published packages next. That looks like:

  1. Publish packages by committing to this branch with `git commit -a -m "[publish mapnik-om-refactor]"

Details on getting the package urls at https://github.com/mapbox/mapbox-studio/blob/mb-pages/CONTRIBUTING.md#packaging.

  1. Then test the OS X package locally (make sure it opens, can load some data), and then test the Windows package - plan over at Developer docs on how to manually test on windows #1218.

@BergWerkGIS yes, exactly - that is what I meant - that at least keeping the original error is desirable, or adding to it like you've demonstrated.

@GretaCB
Copy link
Contributor Author

GretaCB commented Mar 3, 2015

So sorry @BergWerkGIS , I missed your response. Thanks for the example, I will commit a fix with the original error concatenated.

Awesome plan, thanks @springmeyer !

var center = metadata.center;
var zoom = Math.max(metadata.minzoom, view.model.get('minzoom'));
map.setView([center[1], center[0]], zoom);
map.fitBounds([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to account for #1270 - fitBounds should disable animation as well.

@GretaCB
Copy link
Contributor Author

GretaCB commented Mar 20, 2015

Note to self:

@springmeyer
Copy link
Contributor

I'm stealing this as I realize I need this to be able to finish #1287. So, working on bringing this patch up to date now.

@springmeyer
Copy link
Contributor

Successfully integrated this into #1287. Thanks @GretaCB!

@springmeyer springmeyer deleted the mapnik-om-refactor branch March 27, 2015 07:59
@springmeyer springmeyer added this to the v0.2.8 milestone Mar 27, 2015
duncangraham pushed a commit that referenced this pull request Apr 2, 2015
…to stylesAndSources

* 'mb-pages' of https://github.com/mapbox/mapbox-studio:
  [publish 4abb776]
  Start changelog - refs #1301
  cleanup and update deps
  sync templates for topojson/geojson with ogr
  build out test documentation further
  fix test fixtures
  debug why publishing is not being triggered [publish node-mapnik-3.2.0]
  [publish node-mapnik-3.2.0]
  test against upcoming node-mapnik 3.2.1
  use [email protected]
  update and integrate mapnik-om upgrade from #1199
  upgrade mapnik related deps
  upgrade to [email protected]
springmeyer pushed a commit that referenced this pull request Apr 2, 2015
duncangraham pushed a commit that referenced this pull request Apr 2, 2015
…tudio into stylesAndSources

* 'stylesAndSources' of https://github.com/mapbox/mapbox-studio:
  [publish 4abb776]
  Changes the Projects button (and occurences of 'Project(s)') to 'Styles & Sources' this change is because 'Projects' is a name we've given to things made with the web editor which have no connection to studio
  Start changelog - refs #1301
  cleanup and update deps
  sync templates for topojson/geojson with ogr
  build out test documentation further
  fix test fixtures
  debug why publishing is not being triggered [publish node-mapnik-3.2.0]
  [publish node-mapnik-3.2.0]
  test against upcoming node-mapnik 3.2.1
  use [email protected]
  update and integrate mapnik-om upgrade from #1199
  upgrade mapnik related deps
  upgrade to [email protected]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants