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

[android] #5276 - icon should be optional for MarkerView #5328

Closed
wants to merge 184 commits into from

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jun 13, 2016

This PR resolves the crash when trying to add a MarkerView without an icon. This PR introduces a default icon for MarkerView. We can't reuse the icon from Marker since that has extra transparent pixels
closes #5276

cc @bleege @cammace @ivovandongen @zugaldia

brunoabinader and others added 30 commits May 26, 2016 19:36
Fixes an issue where a moved {GL,TexturePool}Holder would use an invalid
pointer when accessing 'objectStore'.

Fixes #5136.
Prevents confusing usage of GL holder objects.
This adds an option to MGLAnnotationView so that a developer can control
how their annotation views scale in size as they approach the top of
the map view (along the Y axis). The size change is also affected by
the pitch (tilt) of the map view. If there is no tilt then scaling
is not performed. As the map is tilted scaling is gradually applied.

This turns the MGLAnnotationView implementation into an Objective C++
class so that SDK constants from C++ files can be used.

The new behavior is enabled by default to maintain consistency with
annotations backed by GL sprites. The MBXViewController redundantly
sets the new property as an illustration of use.
* Location logs are not just kept on the device.
* Some logging packages, e.g.,
 Firebase, now has the option to upload logs to cloud.
* This closes a potential privacy leak.
… the first frame

On the Javascript implementation the array is automatically filled with
zeroes which is not the same thing as `TimePoint::min()`. Here we need
to get our own "zero" which is the timestamp of the first frame.

Fixes #5109
…5164)

This forces the call of the map view's display link target when the
display link is created. When a map view is shown the first time
this is not required. However, if the display link was torn down
and then recreated due to the map view being removed / obscured in the
view hierarchy the map view delegate may expect to be informed when
the map view did finish loading the map when it is shown again.

This adds a call to `updateFromDisplayLink` just after a display link
is created which helps trigger a full refresh of the map in the sense
that all delegate methods get exercised including
`mapViewDidFinishLoadingMap`.
Change domain from api -> events
Replace old certs with new ones with the same name. The new certs
have an expiry that is further out.
Added methods to MGLMapView that return the rendered features at a visible point or within a visible rectangle on the map, optionally restricted to a set of layers, plus voluminous documentation.

Added several new geometry classes corresponding to distinct geometry types supported by geometry.hpp. Added parallel “feature” classes to represent these geometries along with tags (IDs) and attributes (properties) from the source.

Grouped classes in the Foundation and SDK groups by theme.

In iosapp, dropped pins’ callout views now display the name of the topmost named feature at that point.

In osxapp, a long press on the map highlights the features under the cursor. Dropping a pin via the menu or context menu item shows the usual dropped pin, but the pin’s title is now the name of a feature under the cursor, if available, rather than “Dropped Pin”.

Fixes the iOS/OS X side of #352.
Made writability of MGLFeature properties private, to avoid having to awkwardly explain that changes to the properties don’t change the map (maybe someday they will). This allows the identifier and attributes to be set in only one place, avoiding copy-pasta.
MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.

Fixes #1729.

[ios, osx] Updated changelog
Removed a level of indirection when creating Objective-C collections from C++ collections. Adopted mbgl typedefs for geometry.hpp types. Factored out MGLPolygon construction.
Ignore any multipolyline, multipolygon, or shape collection object passed into -addAnnotation: or -addAnnotations:. Previously, these methods broke apart the compound shape into its constituent shapes in order to recursively add them to the map. But that broke assumptions about a one-to-one correspondence between annotations and their contexts during selection and deletion.
Moved feature selection to the context menu and restored the press gesture for dropping a pin. Bust complex features into simple shapes to feed into MGLMapView as overlays.
Ported the following patches:
 - [convert mat4 exMatrix to a vec2 extrudeScale](mapbox/mapbox-gl-shaders@a8d549b)
 - [Enabled data-driven styling for circle-radius](mapbox/mapbox-gl-shaders@4356e41)
 - [Reduce shader boilerplate, refactor "Bucket"](mapbox/mapbox-gl-shaders@7d3da8f)
Shader parent object has been safely created, so it is safe to
initialize the *Shader attributes via initialization list.
Added MGLAnnotationView to jazzy’s table of contents.
@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jun 13, 2016
@tobrun tobrun added this to the android-v4.1.0 milestone Jun 13, 2016
@bleege
Copy link
Contributor

bleege commented Jun 13, 2016

Thanks for picking this up @tobrun. One question though, why bundle and use default_markerview.png and not use the the default marker that Core GL already provides?

@tobrun
Copy link
Member Author

tobrun commented Jun 13, 2016

@bleege

The gl marker:

screen shot 2016-06-13 at 16 34 55

The view marker:

screen shot 2016-06-13 at 16 36 15

The problem we had with GL markers is that we didn't have a way to do anchoring/offsets. To be able to put the bottom of the marker at the correct position, we had to add extra transparent pixels. Now with view markers we have anchors and they are by default placed at the bottom of the image.

This is what @cammace was indicating in #5276 (comment) with:

BTW the default marker image has a bunch of bottom padding right now and can either be cropped out or .anchor(0.5f,0.5f) needs to be used

@tobrun
Copy link
Member Author

tobrun commented Jun 14, 2016

CI approved, going to rebase and merge

@tobrun tobrun force-pushed the 5276-icon-should-be-optional branch from b1afa8a to ac30ee1 Compare June 14, 2016 10:22
@tobrun
Copy link
Member Author

tobrun commented Jun 14, 2016

rebased against master instead of release and only noticed after force pushing, follow up PR in #5348

@tobrun tobrun closed this Jun 14, 2016
@bleege
Copy link
Contributor

bleege commented Jun 14, 2016

The problem we had with GL markers is that we didn't have a way to do anchoring/offsets. To be able to put the bottom of the marker at the correct position, we had to add extra transparent pixels. Now with view markers we have anchors and they are by default placed at the bottom of the image.

Thanks for the details in the thinking behind this. Can you help me understand why the solution wasn't to fix the Core GL markers then instead of duplicating default markers?

@tobrun tobrun deleted the 5276-icon-should-be-optional branch June 15, 2016 12:07
@zugaldia zugaldia mentioned this pull request Jun 20, 2016
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.