【发布时间】:2017-09-10 11:10:47
【问题描述】:
我需要在我的站点中显示自定义图像作为位置标记。
这里我附上了图片。Image
【问题讨论】:
-
添加一些你尝试过的代码
标签: javascript jquery laravel
我需要在我的站点中显示自定义图像作为位置标记。
这里我附上了图片。Image
【问题讨论】:
标签: 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>
脚本
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"
});
【讨论】: