SVG到Mapael工具为我提供了一个php文件而不是javascript文件

时间:2019-02-05 05:34:23

标签: jquery mapael

我正在遵循本指南“为jQuery Mapael创建自己的矢量地图” https://www.vincentbroute.fr/mapael/create-map.php

因此,我使用“ SVG到Mapael”工具https://www.vincentbroute.fr/mapael/svg-to-mapael.php将.svg映射转换为javascript格式,而不是该工具的javascript文件,该工具的输出是php文件。有人知道使用此工具获取JavaScript吗?

这就是SVG到Mapael生成的php文件中的内容”,而该php文件没有任何意义。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>SVG To Mapael - jQuery Mapael</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="jQuery Mapael is a jQuery plugin based on raphael.js that allows you to display dynamic vector maps. ">

    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="assets/css/mapael.css" rel="stylesheet">
    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCoreDefault.min.css"/>
</head>

<body id="top">

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <h1><a href="#top">jQuery Mapael</a></h1>
            <ul class="nav">
                <li><a href="/mapael/#overview">Overview</a></li>
                <li><a href="/mapael/#examples">Examples</a></li>
                <li><a href="/mapael/#api-reference">Documentation</a></li>
                <li><a href="https://github.com/neveldo/mapael-maps" target="_blank">Additional maps</a></li>
                <li><a href="create-map.php">Create your own map</a></li>
                <li><a href="try.html">Try Mapael online</a></li>
                <li><a href="https://twitter.com/VincentBroute" target="_blank"><img src="assets/img/twitter_logo.png" width="18px" height="15px" style="vertical-align:top;" /> Twitter</a></li>
                <li><a href="https://github.com/neveldo/jQuery-Mapael" target="_blank"><img src="assets/img/github_logo.png" width="15px" height="15px" style="vertical-align:top;" /> Github</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="container" style="max-width:700px;">
    <h2 style="margin-bottom:10px;text-align:center;">SVG To Mapael</h2>
    <p>This tool aims to generate the jQuery Mapael map file from an SVG file that contains the paths of the areas to retrieve.</p>
    <form role="form" action="svg-to-mapael.php" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="roundprecision">Round precision</label>
            <input type="text" class="form-control" id="roundprecision" name="roundprecision" value="2">
        </div>
        <div class="form-group">
            <label for="name">Name of the map</label>
            <input type="text" class="form-control" id="name" name="name" value="">
        </div>
        <div class="form-group">
            <label for="author">Author</label>
            <input type="text" class="form-control" id="author" name="author" value="">
        </div>
        <div class="form-group">
            <label for="svg">SVG map (.svg)</label>
            <input type="file" name="svg" id="svg">
        </div>
        <button type="submit" class="btn btn-default">Generate mapael map</button>
    </form>
</div>


<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushXml.min.js"></script>
<script type="text/javascript" src="/mapael/assets/js/main.js"></script>

<script type="text/javascript">
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-42216777-2', 'auto');
    ga('send', 'pageview');
</script>

</body>
</html>

0 个答案:

没有答案