如何为图层添加个性化注释? Mapbox [快速]

时间:2018-10-30 19:34:24

标签: ios swift xcode mapbox

如何为图层添加个性化注释?

我的自定义类:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

<select id="mySelect_123">
<option value='0' style='font-size:8pt;'>Choose...</option>
<option value='1'  style='font-size:8pt;'>The first option</option>
<option value='2'  style='font-size:8pt;'>The second option</option>
...
<option value='50'  style='font-size:8pt;'>The fiftieth option</option>
</select>

<select id="mySelect_456">
<option value='0' style='font-size:8pt;'>Choose...</option>
<option value='1'  style='font-size:8pt;'>The first option</option>
<option value='2'  style='font-size:8pt;'>The second option</option>
...
<option value='50'  style='font-size:8pt;'>The fiftieth option</option>
</select>

<select id="mySelect_789">
<option value='0' style='font-size:8pt;'>Choose...</option>
<option value='1'  style='font-size:8pt;'>The first option</option>
<option value='2'  style='font-size:8pt;'>The second option</option>
...
<option value='50'  style='font-size:8pt;'>The fiftieth option</option>
</select>

<script language="javascript">
$(document).ready(function(){
    $("select[id^='mySelect']").click(function(){
        var cwID = 49; // this value is dynamic
        console.log('got to scroll: ' + cwID); //has good value
        var sel = $(this).attr('id');
        console.log(sel); // has correct id
        var i = $("#"+sel+" option[value='"+cwID+"']").index();
        console.log('and i is: ' + i); // gets the proper index
        $('#mySelect123 option[value="'+cwID+'"]').focus(); // does nothing
        $("#" + sel).find("option[value="+cwID+"]").focus(); // nope
$("#"+sel).scrollTop($(this).find("option[value="+cwID+"]").offset().top); // nada
          $(this).animate({scrollTop:i}); //still, nothing
          $("#mySelect123").scrollTop(i); // nope
          $("#" + sel).animate({
                scrollTop: i
            },500);
            console.log('the work should be done by now');
        });
    });
</script>

问题: 无法将类型“ [PointCustom]”的值转换为预期的参数类型“ MGLShape?”

0 个答案:

没有答案