Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

adds default marker files - #2440

Merged
ljbade merged 1 commit into
masterfrom
add-default-markers
Oct 2, 2015
Merged

ljbade merged 1 commit into
masterfrom
add-default-markers

Conversation

@nickidlugash

Copy link
Copy Markdown
Contributor

Ref #2106

@1ec5 @bleege @incanus @friedbunny I've added marker files to iOS. Looking at Android now.

While I'm doing that, here's some visuals – let me know if you have any feedback.

Streets

screen shot 2015-09-28 at 5 54 10 pm
screen shot 2015-09-28 at 5 53 46 pm

Emerald

screen shot 2015-09-28 at 5 50 10 pm
screen shot 2015-09-28 at 5 50 39 pm

Satellite w/ labels

screen shot 2015-09-28 at 5 49 19 pm
screen shot 2015-09-28 at 5 49 29 pm

Dark

screen shot 2015-09-28 at 5 48 06 pm
screen shot 2015-09-28 at 5 48 40 pm

Light

screen shot 2015-09-28 at 5 46 25 pm
screen shot 2015-09-28 at 5 46 31 pm

@incanus

incanus commented Sep 28, 2015

Copy link
Copy Markdown
Contributor

Two thoughts here:

  1. We're switching from blue as the current default for the vector styles to red now.
  2. Red markers of that style are pretty close to Google's look. Apple also uses red (pins), so using blue alongside our default iOS blue tint user dot and lower-right info button looks pretty darn good, IMHO.

One minor thought: it always seems to me that the white dot on the markers should either be a) gone or b) alpha-transparent instead of white. Anyone else?

@bleege

bleege commented Sep 28, 2015

Copy link
Copy Markdown
Contributor

I could do without the white dot.

@nickidlugash

Copy link
Copy Markdown
Contributor Author

Red markers of that style are pretty close to Google's look. Apple also uses red (pins), so using blue alongside our default iOS blue tint user dot and lower-right info button looks pretty darn good, IMHO.

I chose red because it is higher contrast from more basemap features (e.g. that blue is pretty darn similar to interstate highway shields in both Streets and Emerald). I also think it's more readable for the markers to be a different color than the user dot (plus the two shades of blue clash). It is more similar to Google's and Apple's look, but I think there's a reason they both use red. I would still lean more towards red, unless there are any more considerations for keeping it blue.

One minor thought: it always seems to me that the white dot on the markers should either be a) gone or b) alpha-transparent instead of white. Anyone else?

I was going to remove it because I found it extraneous, but @samanpwbb pointed out that it does help a lot to articulate clustered markers, and I agree. I can try making it alpha-transparent.

@bleege for the default markers for Android can you please confirm that:

  1. I should put 1 file into each of the first 5 folders here: https://github.com/mapbox/mapbox-gl-native/tree/master/android/java/MapboxGLAndroidSDKTestApp/src/main/res
  2. mdpi = "standard" size in iOS, hdpi = @1.5x, xhdpi = @2x, xxhdpi = @3x, and xxxhdpi = @4x
  3. All the files should be named the same: default_marker.png

@nickidlugash

Copy link
Copy Markdown
Contributor Author

I can try making it alpha-transparent.

Er, nevermind, this is not going to look good with clustered markers, which was the point of keeping the dot.

@incanus

incanus commented Sep 28, 2015

Copy link
Copy Markdown
Contributor

I'm sold on red + white dot as is. Carry on 😃

Let's square away Android assets as well, then @mapbox/mobile can jump in and adjust code as necessary to shore this up.

@incanus incanus added GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS Android Mapbox Maps SDK for Android labels Sep 28, 2015
@nickidlugash

Copy link
Copy Markdown
Contributor Author

@bleege @incanus @1ec5 Android assets are added now. @bleege please double-check the Android assets when you get a chance – you weren't online when I added them but I wanted to get something up before I left tonight. If anything looks incorrect I can fix tomorrow.

@friedbunny

Copy link
Copy Markdown
Contributor

This looks great @nickidlugash, really like the change to red.

@ljbade

ljbade commented Sep 29, 2015

Copy link
Copy Markdown
Contributor

Looks good to me.

@bleege

bleege commented Sep 29, 2015

Copy link
Copy Markdown
Contributor

@nickidlugash Yep, Android sizes are documented here so it looks like your ratios above are 👌 . The assets generated from them also look great! Thanks!

@1ec5 1ec5 assigned 1ec5 and bleege and unassigned 1ec5 Sep 29, 2015
@1ec5

1ec5 commented Sep 29, 2015

Copy link
Copy Markdown
Contributor

The iOS side is done. Over to @bleege for the Android side.

@incanus

incanus commented Oct 1, 2015

Copy link
Copy Markdown
Contributor

@nickidlugash Do you have an SVG or similar vector source that we can roll into the project somehow for future reference? e.g. There may someday be higher-res requirements that can't simply scale up the largest we have here now, and we don't want to fish around trying to remember where the source is and/or recreate it.

@nickidlugash

Copy link
Copy Markdown
Contributor Author

@incanus sure – where do you want me to put the source file?

@incanus

incanus commented Oct 1, 2015

Copy link
Copy Markdown
Contributor

@nickidlugash Let's make a platform/ios/resources_source folder maybe? It shouldn't need added to anything but Git, as it'll be fetched from the filesystem only (not Xcode, etc.)

@incanus

incanus commented Oct 1, 2015

Copy link
Copy Markdown
Contributor

Actually, let's go with platform/default/resources @nickidlugash so we can source for all platforms.

@ljbade

ljbade commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

I'm going to wire up the Android side.

@ljbade

ljbade commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

I've hit a snag on Android. The current setSprite API is too iOS centric and blows up on Android where you can have up to 4x DPI (so far).

It also blows up when you need a bitmap scale <1x, which can happen on low DPI devices. Another case might be where a developer only includes hdpi bitmaps assets, then a user runs the app on a ldpi or mdpi phone. In this case we need to scale down.

Going to push a commit that just uses a scale of 1x for the moment which on my Samsung S6 results in a comically large marker. This is so we can get this merged for iOS. We will need to come back to it for Android and fix this scaling problem before we delete the "default_marker" from the styles submodule.

device-2015-10-02-164625

@1ec5

1ec5 commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

The strict resolution-dependent nature of this API has inconvenienced iOS developers too: #2198.

@ljbade
ljbade force-pushed the add-default-markers branch from 6629144 to aec429b Compare October 2, 2015 06:51
@ljbade

ljbade commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

Going to rebase and merge next.

@ljbade
ljbade force-pushed the add-default-markers branch from aec429b to 8aacfd5 Compare October 2, 2015 06:52
@ljbade
ljbade force-pushed the add-default-markers branch from 8aacfd5 to 21b42ee Compare October 2, 2015 06:53
@ljbade

ljbade commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

@jfirebaugh Looks like LLVM is down again:

curl -sSL "http://llvm.org/apt/llvm-snapshot.gpg.key" | sudo -E apt-key add -
curl: (56) Recv failure: Connection reset by peer
gpg: no valid OpenPGP data found.

EDIT:
Looks like npm is having connection issues too. Might be a general Travis network issue.

@ljbade

ljbade commented Oct 2, 2015

Copy link
Copy Markdown
Contributor

OK everything passed but Linux and node due to LLVM server issues. Since this change only affects iOS and Android, I'm going to merge.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants