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

add MapBox marker support #5

Closed
Closed

Description

@incanus

Similar to our custom RMMarker stuff we should make it easy to add MBXPointAnnotation objects to the map that tie into Maki.

MBXPointAnnotation *pin = [MBXPointAnnotation new];
pin.coordinate = someCoordinate;
pin.pinImageID = @"bus";
pin.pinColor = [UIColor purpleColor];
[mapView addAnnotation:pin];

Activity

  1. incanus commented on Sep 24, 2013

    @incanus
    ContributorAuthor

    Or, even better:

    pin.pinImageID = MBXPinImageBus;
  2. skeeJay commented on Oct 30, 2013

    @skeeJay

    +1

  3. added this to the 0.2.0 milestone on Feb 18, 2014
  4. incanus commented on Feb 24, 2014

    @incanus
    ContributorAuthor

    Carrying over the Maki-specific stuff from @wsnook's #21 here:

    • Justin, I chose to diverge a little bit from your pin.pinImageID = MBXPinImageBus; suggestion because there's a pretty significant advantage to closely following the Core API... when new Maki icons are added, this code should still work without having to make any changes.

      That's fine -- it was just an API idea. I definitely agree with the expandability argument here about new icons. For some background on this, see API for list of available icons maki#60, which seems to have stalled.

    • The geoJSON, and the markers, are added to the cache according to the existing caching patterns. However, I didn't copy the automatic retry from updateOverlay because it looked like that could potentially cause an infinite loop.

      👍

    • This also relies on Add marker geoJSON to the sample map (for #38) #44 so that we have a good testbed.

    • With methods like -addMakiMarkerSize:... I'd rather we don't mention Maki specifically. That's the project name for the icons, of course, but it doesn't mean anything to anyone outside of the Mapbox ecosystem and just referring to things as "markers" IMHO is more friendly. It's one less Mapbox-ism to learn. The 99% use case I frequently see here is someone adding styled markers to their hosted map, then wanting to see those reflecting identically on iOS. We don't get a lot of folks knowing about Maki specifically and/or adding markers by symbol name. I'd be fine leaving that off indefinitely until we see a definite requested need for it.

    • We should rework the imagery-related retry behavior here based on lessons from Fix for #22: Only write to cache for an HTTP 200, sweep empty png files. #23.

  5. incanus commented on Feb 25, 2014

    @incanus
    ContributorAuthor

    I think you're saying that once we nail down how the control flow should work for HTTP error handling and caching for tiles, we should do something very similar for markers. If so, that sounds good to me.

    Yep.

  6. incanus commented on Feb 27, 2014

    @incanus
    ContributorAuthor

    @wsnook has implemented this in #55 and that's now in master.

  7. TosinAF commented on Nov 27, 2014

    @TosinAF

    Is this in version 0.5.0, can't seem to find it

  8. incanus commented on Nov 28, 2014

    @incanus
    ContributorAuthor

    @TosinAF You want -[MBXRasterTileOverlay initWithMapID:includeMetadata:includeMarkers:] being sure to include markers, but that is also the default if you just use -initWithMapID:.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions