Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds static maps #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Adds static maps #7

wants to merge 3 commits into from

Conversation

darthmaim
Copy link
Member

@darthmaim darthmaim commented Oct 18, 2016

DO NOT MERGE YET - WORK IN PROGRESS

This adds static maps (render a part of the GW2 map to an image) to gw2tools.

TODO

  • Tests
  • Render labels over icons
  • Render custom elements
    • Icons (for example WvW objectives)
    • Images (for example circles for event regions)
    • Labels (for example bigger/colored to highlight a point of interest)
    • Polylines (for example region outlines/event locations)
  • PointsOfInterests with lower opacity (for example waypoints in a different floor)
  • Prevent overlapping labels (?)
  • Usage examples
  • Docs

Basic Usage

// setup map
$map = new StaticMap($continent, $floor);
$map->setBounds($continent_rect[0], $continent_rect[1]);

// add pois that should be rendered
$map->addWaypoint($poiPosition, $poiLabel);

// render to an image
$image = $map->render(1024, 1024);

Here are two examples (code for these not released yet):
lionsarch
Lions arch, rendered with all waypoints, landmarks, vistas, …

event
The event Defeat the renegade charr. and the nearest nearest 3 points of interest. The red circle is the radius in which the event is active.

@darthmaim darthmaim self-assigned this Oct 18, 2016
@codecov-io
Copy link

codecov-io commented Oct 18, 2016

Current coverage is 48.29% (diff: 4.50%)

No coverage report found for master at 2f097f8.

Powered by Codecov. Last update 2f097f8...8c0c782

@darthmaim darthmaim mentioned this pull request Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants