Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用javascript在地图标记中显示自定义图像_Javascript_Jquery_Laravel - Fatal编程技术网

如何使用javascript在地图标记中显示自定义图像

如何使用javascript在地图标记中显示自定义图像,javascript,jquery,laravel,Javascript,Jquery,Laravel,我需要显示自定义图像作为我的网站的位置标记 这里我附上了图片。html <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"> //append jquery map marker js <div id="googlemaps"></div> 谢谢你的反馈,我已经实现了这个功能。但它只是显示图像。@Ra

我需要显示自定义图像作为我的网站的位置标记

这里我附上了图片。

html

<script async defer
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
//append jquery map marker js


<div id="googlemaps"></div>

谢谢你的反馈,我已经实现了这个功能。但它只是显示图像。@RameshChudasama为什么不在一个图像中合并两个图像?我想你应该在一个图像中合并两个图像,然后在设置路径Javascript之后,我如何合并两个图像?在那里添加一些你尝试过的代码
    var mapMarkers =    {
                            "markers":
                            [
                                {
                                    "latitude": "48.85661",
                                    "longitude":"2.35222",
                                    "icon": "../wp-content/uploads/2016/08/pin.png"
                                }
                            ]
                        };
    $("#googlemaps").mapmarker
    ({
        zoom : 16,
        center : "48.85661, 2.35222",
        dragging : 1,
        mousewheel : 0,
        markers : mapMarkers,
        featureType : "all",
        visibility : "on",
        elementType : "geometry"
    });