Page MenuHomePhabricator

[betalabs] Uncaught TypeError: Cannot read property 'tagName' of null for adding a marker
Closed, ResolvedPublic

Description

The error is displayed in testwiki (wmf.25)

  1. In betalabs add a mapframe to a page.
  2. In VE click to edit the mapframe. Click on 'Draw a marker' and place the marker somewhere.

The Console will display:

Uncaught TypeError: Cannot read property 'tagName' of null
    at HTMLHtmlElement.<anonymous>

Event Timeline

Restricted Application added a project: Maps. · View Herald TranscriptMar 14 2018, 11:57 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Restricted Application added a project: Discovery. · View Herald TranscriptMar 14 2018, 11:58 AM

I can't reproduce this locally or in beta labs. Is there a specific page where you could reproduce this?

Etonkovidova closed this task as Resolved.Apr 12 2018, 7:09 PM
Etonkovidova claimed this task.

I re-checked it in testwiki (wmf.29) - could be fixed by T191932: Static map renderer rejects features without a "properties" key as invalid GeoJSON. No Console errors are displayed.
Just for documenting testing - the following map was used:

<mapframe text="India (80,20)" width=700 height=400 zoom=3 longitude="80" latitude="20">
{
  "type": "Feature",
  "geometry": { "type": "Point", "coordinates": [80,20] }
}
</mapframe>

After placing one marker - the code is:

<mapframe text="India (80,20)" width="700" height="400" zoom="3" longitude="79.98" latitude="19.97" align="right">
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          80,
          20
        ]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [
          40.95703125000001,
          34.452218472826566
        ]
      }
    }
  ]
}
</mapframe>