Darsin Callagher.5821:

Hey guys, i’m trying to create a personal event timer with all the best features from multiple websites.
so far it get’s all the map poi’s, hearts etc and puts them in layers.
then i get all the events i care about and their details.

now i’m trying to place the event circle.png ontop of the map like gwstuff is doing.
but his data is inconsistent with what comes out of the api.

i found a conversion for tile coords to continent coords. but that still doesn’t seem to work completely.

This is my coord conversion.
function calc_continent_coord($map_rect, $continent_rect, $event_location)
{
$center = $event_location->center;

$map_width = $map_rect10 – $map_rect00;
$map_height = $map_rect11 – $map_rect01;

$continent_width = $continent_rect10 – $continent_rect00;
$continent_height = $continent_rect11 – $continent_rect01;

$xMap = ($center0 – $map_rect00) / $map_width;
$yMap = ($center1 – $map_rect01) / $map_height;

$yMap = 1 – $yMap;

$xContinent = $continent_rect00 + $xMap * $continent_width;
$yContinent = $continent_rect01 + $yMap * $continent_height;

return [$xContinent,$yContinent];
}
and then i use

worldToPixel: function(latlng)
{
return map.project(latlng,0);
},

pixelToWorld: function(xy)
{
return map.unproject(xy, 0);
},

navigate: function(x, y)
{
var latlng = this.pixelToWorld([x, y]);
map.setView(latlng, 7);
},
setScaledMarker: function(key, x, y, r, image)
{

if (this.eventmarkers[key])
{
map.removeLayer(this.
eventmarkers[key]);
}

if (r && image)
{
var boundSouthWest = this.pixelToWorld([x – r, y + r]);
var boundNorthEast = this.pixelToWorld([x + r, y – r]);
var layer = new L.ImageOverlay(image, [boundSouthWest, boundNorthEast]);
map.addLayer(layer);
this.eventmarkers[key] = layer;
}
else
{
delete this.
eventmarkers[key];
}
}

to create the layers.
1. i don’t even see the actual layer.
2. how does the radius translate to the event vs the coordinate.
3. some of them have a radius of 1000 and some have 8500 that seems like a large difference.

Lil Puppy.5216:

1000 is like the little escort ones, 8500 is like major boss ones.
Fire elemental has a huge area circle during one of the pre-event phases that circles just inside the entire building for example.
Somewhere inside this forum is the circle to map translation.
GW2Stuff may be adjusting the size/location of some of the circles manually.
Some events move, I don’t believe the API gives current GPS type location info, only starting location info.

Dr Ishmael.9685:

Some events move, I don’t believe the API gives current GPS type location info, only starting location info.

That’s correct, the API only lists the starting location of the objective, it does not track the current location.