Maps4HTML / Web-Map-Custom-Element

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/Web-Map-Custom-Element/
Other
54 stars 15 forks source link

Clicking on a map-a link for a feature with a query layer also, does zoom and also opens query popup #879

Open AliyanH opened 11 months ago

AliyanH commented 11 months ago

Steps to reproduce -

1) go to this page - 2) run the code given below 3) click on the circle

The map both zooms and opens a popup, it should instead only zoom and not open the popup for the query layer.

Code:

<mapml-viewer projection="CBMTILE" zoom="2" lat="45" lon="-90" controls controlslist="nofullscreen geolocation">
      <map-caption>A pleasing map of Canada</map-caption>
      <layer- label="CBMT" src="https://geogratis.gc.ca/mapml/en/cbmtile/cbmt/" checked></layer->
      <layer- label="Hat Guy" checked>
        <map-feature id="twohats" zoom="15" class="twohats">
        <map-properties>
          <table>
            <tr>
              <th>code</th>
              <td>1200020</td>
            </tr>
            <tr>
              <th>accuracy</th>
              <td>26</td>
            </tr>
            <tr>
              <th>valdate</th>
              <td>1995</td>
            </tr>
            <tr>
              <th>image</th>
              <td><a href="https://www.veterans.gc.ca/eng/remembrance/memorials/national-inventory-canadian-memorials/details/9304">
                <img src="https://www.veterans.gc.ca/images/remembrance/memorials/national-inventory-canadian-memorials/mem/35059-173a.jpg" width="60" height="60"/>
              </a>
              </td>
            </tr>
            <tr>
              <th>theme</th>
              <td>FO</td>
            </tr>
            <tr>
              <th>type</th>
              <td>2</td>
            </tr>
            <tr>
              <th>elevation</th>
              <td>61</td>
            </tr>
            <tr>
              <th>altiaccu</th>
              <td>5</td>
            </tr>
          </table>
        </map-properties>
        <map-geometry>
          <map-point>
            <map-coordinates>-75.705278 45.397778</map-coordinates>
          </map-point>
        </map-geometry>
      </map-feature>
      </layer->
      <layer- src="https://geogratis.gc.ca/mapml/en/cbmtile/fdi/" label="Layer" checked=""></layer->
      <layer- label="Circle" checked=""><map-meta name="extent" content="top-left-longitude=-98.67100654844106, top-left-latitude=38.76974030699444, bottom-right-longitude=-80.00417076850671,bottom-right-latitude=51.868161971975205"></map-meta><map-meta name="projection" content="CBMTILE"></map-meta><map-meta name="cs" content="gcrs"></map-meta><map-feature><map-featurecaption>Circle</map-featurecaption><map-geometry><map-a href="#5, -90, 45"><map-polygon><map-coordinates>-89.33758865847388 51.868161971975205 -90.37417356949483 51.832341873874014 -91.39622190619546 51.725396073974466 -92.38961801600699 51.54885183920185 -93.34105855046808 51.305201841703585 -94.23838866264069 50.997829297292796 -95.07086435618591 50.63091112035998 -95.82933101959452 50.20930571951302 -96.50631703072847 49.73843236272703 -97.09604896210305 49.22414861261117 -97.59440046102954 48.67263135283261 -97.99878998356314 48.09026562574542 -98.30804338010829 47.48354410360322 -98.52223634250777 46.85897870264154 -98.64252954523697 46.22302474049861 -98.67100654844106 45.58201719084189 -98.61052166627199 44.94211801223515 -98.4645623765523 44.30927319460041 -98.23712864591515 43.689178031204705 -97.93262983817823 43.087249136380706 -97.5557986508289 42.50860184137358 -97.11162072565838 41.95803177229488 -96.60527812462544 41.43999961357669 -96.04210466820828 40.958618264648614 -95.42755112589164 40.517641791344644 -94.76715836464288 40.12045574720781 -94.06653675234364 39.770068588174105 -93.33135034259776 39.46910402492916 -92.56730460881106 39.219794250471715 -91.78013673056697 39.02397404739371 -90.97560765158646 38.883075822322475 -90.15949531757579 38.79812563671041 -89.33758865847388 38.76974030699444 -88.51568199937196 38.79812563671041 -87.6995696653613 38.883075822322475 -86.89504058638079 39.02397404739371 -86.10787270813672 39.2197942504717 -85.34382697435001 39.46910402492916 -84.60864056460412 39.770068588174105 -83.90801895230487 40.12045574720781 -83.24762619105614 40.51764179134463 -82.63307264873949 40.958618264648614 -82.06989919232231 41.43999961357668 -81.56355659128937 41.958031772294866 -81.11937866611885 42.50860184137358 -80.74254747876954 43.087249136380706 -80.43804867103262 43.6891780312047 -80.21061494039546 44.30927319460041 -80.06465565067577 44.94211801223515 -80.00417076850671 45.58201719084189 -80.0326477717108 46.22302474049861 -80.15294097443999 46.85897870264154 -80.36713393683947 47.48354410360322 -80.67638733338461 48.09026562574542 -81.08077685591823 48.67263135283261 -81.57912835484473 49.22414861261117 -82.1688602862193 49.73843236272703 -82.84584629735325 50.20930571951302 -83.60431296076185 50.63091112035998 -84.4367886543071 50.997829297292796 -85.33411876647968 51.305201841703585 -86.28555930094075 51.54885183920185 -87.27895541075229 51.72539607397445 -88.30100374745294 51.832341873874014 -89.33758865847388 51.868161971975205 </map-coordinates></map-polygon></map-a></map-geometry><map-properties><table><thead><tr><th role="columnheader" scope="col">Property name</th><th role="columnheader" scope="col">Property value</th></tr></thead><tbody></tbody></table></map-properties></map-feature></layer->
    </mapml-viewer>