- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经成功地为 geoxml3 解析器自定义了标记图标,但是,引入markerclustererplus 会覆盖自定义的单独图标。我找到了有关更改群集图标的信息,但没有找到有关markerclustererplus 使用的单个图标的信息。
我还失去了单击标记时显示信息窗口(?)的单击功能。我尝试添加一个点击监听器,但它不会产生与 geoxml3 产生的默认行为相同的弹出结果。
工作 fiddle :http://jsfiddle.net/BartmanEH/z7bfmyo2/
var map;
var myParser;
var markerClusterer;
var markers = [];
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: 45.4,
lng: -75.7
},
zoom: 14
});
markerClusterer = new MarkerClusterer(map, [], {});
myParser = new geoXML3.parser({
map: map,
// markerOptions: {
// icon: {
// url: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png", // url
// scaledSize: new google.maps.Size(48, 48) // scaled size
// }
// },
// createMarker:function(placemark){
// var marker = new google.maps.Marker({position:placemark.latlng});
// google.maps.event.addListener(marker, "click", function(){
// //console.log(placemark.name);
// infoWindow.content = placemark.description;
// infoWindow.open(map, marker);
// });
// markerClusterer.addMarker(marker);
// },
zoom: false,
afterParse: useData
});
myParser.parseKmlString(file2kml);
function useData(docs) {
console.log("parsed " + docs[0].placemarks.length + " placemarks");
for (var i = 0; i < docs[0].placemarks.length; i++) {
var marker = new google.maps.Marker({
position:docs[0].placemarks[i].latlng,
icon: {
url: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png",
scaledSize: new google.maps.Size(32, 32)
}
});
markers.push(marker);
}
//markerclusterer overrides custom icon!
markerClusterer.addMarkers(markers, true);
}
}
google.maps.event.addDomListener(window, 'load', initMap);
var file2kml = `<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>test placemarks</name>
<Style id="icon-1899-DB4436-labelson">
<IconStyle>
<color>ff3644db</color>
<scale>1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/ms/icons/red-dot.png</href>
</Icon>
<hotSpot x="32" xunits="pixels" y="64" yunits="insetPixels"/>
</IconStyle>
</Style>
<Placemark>
<name>Church Of Ascension</name>
<description><![CDATA[latitude: 45.410755<br>longitude: -75.681623]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.410755</value>
</Data>
<Data name="longitude">
<value>-75.681623</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.681623,45.410755,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bank Street Dragon</name>
<description><![CDATA[latitude: 45.420032<br>longitude: -75.699788]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.420032</value>
</Data>
<Data name="longitude">
<value>-75.699788</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.699788,45.420032,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Place Bell Canada</name>
<description><![CDATA[latitude: 45.420214<br>longitude: -75.692603]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.420214</value>
</Data>
<Data name="longitude">
<value>-75.692603</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.692603,45.420214,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Royal Canadian Legion Dominion Command</name>
<description><![CDATA[latitude: 45.310682<br>longitude: -75.899762]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.310682</value>
</Data>
<Data name="longitude">
<value>-75.899762</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.899762,45.310682,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Lieutenant Colonel John By</name>
<description><![CDATA[latitude: 45.422076<br>longitude: -75.692515]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.422076</value>
</Data>
<Data name="longitude">
<value>-75.692515</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.692515,45.422076,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Oscar Peterson, the Street Musician</name>
<description><![CDATA[latitude: 45.42268<br>longitude: -75.693955]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.42268</value>
</Data>
<Data name="longitude">
<value>-75.693955</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.693955,45.42268,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Somerset Square</name>
<description><![CDATA[latitude: 45.406222<br>longitude: -75.722117]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.406222</value>
</Data>
<Data name="longitude">
<value>-75.722117</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.722117,45.406222,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Windsor Park Flood Control</name>
<description><![CDATA[latitude: 45.39149<br>longitude: -75.677548]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.39149</value>
</Data>
<Data name="longitude">
<value>-75.677548</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.677548,45.39149,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Frank Clair Statue</name>
<description><![CDATA[latitude: 45.397413<br>longitude: -75.683657]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397413</value>
</Data>
<Data name="longitude">
<value>-75.683657</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.683657,45.397413,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ottawa Mill St. Brewpub</name>
<description><![CDATA[latitude: 45.419537<br>longitude: -75.71263]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.419537</value>
</Data>
<Data name="longitude">
<value>-75.71263</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.71263,45.419537,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>David Perry Memorial Bench</name>
<description><![CDATA[latitude: 45.397002<br>longitude: -75.6743]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397002</value>
</Data>
<Data name="longitude">
<value>-75.6743</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.6743,45.397002,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Companions of the Cross</name>
<description><![CDATA[latitude: 45.412132<br>longitude: -75.70911]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.412132</value>
</Data>
<Data name="longitude">
<value>-75.70911</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.70911,45.412132,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Sunburst Building</name>
<description><![CDATA[latitude: 45.419296<br>longitude: -75.699572]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.419296</value>
</Data>
<Data name="longitude">
<value>-75.699572</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.699572,45.419296,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Rideau Curling Club</name>
<description><![CDATA[latitude: 45.413011<br>longitude: -75.704687]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.413011</value>
</Data>
<Data name="longitude">
<value>-75.704687</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.704687,45.413011,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Carling Otrain Station </name>
<description><![CDATA[latitude: 45.397474<br>longitude: -75.709528]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397474</value>
</Data>
<Data name="longitude">
<value>-75.709528</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.709528,45.397474,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Geese Artwork</name>
<description><![CDATA[latitude: 45.417308<br>longitude: -75.700673]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.417308</value>
</Data>
<Data name="longitude">
<value>-75.700673</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.700673,45.417308,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name><![CDATA[Saint Patrick\'s Basilica]]></name>
<description><![CDATA[latitude: 45.41667<br>longitude: -75.70057]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.41667</value>
</Data>
<Data name="longitude">
<value>-75.70057</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.70057,45.41667,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Headless Elephants</name>
<description><![CDATA[latitude: 45.409045<br>longitude: -75.688275]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.409045</value>
</Data>
<Data name="longitude">
<value>-75.688275</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.688275,45.409045,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Valour Bridge</name>
<description><![CDATA[latitude: 45.310651<br>longitude: -75.901318]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.310651</value>
</Data>
<Data name="longitude">
<value>-75.901318</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.901318,45.310651,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Marble Soccer Balls</name>
<description><![CDATA[latitude: 45.404574<br>longitude: -75.711718]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.404574</value>
</Data>
<Data name="longitude">
<value>-75.711718</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.711718,45.404574,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Shrine To Mary.</name>
<description><![CDATA[latitude: 45.414046<br>longitude: -75.708891]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.414046</value>
</Data>
<Data name="longitude">
<value>-75.708891</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.708891,45.414046,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Guigues Hall Saint Paul University</name>
<description><![CDATA[latitude: 45.408308<br>longitude: -75.676281]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.408308</value>
</Data>
<Data name="longitude">
<value>-75.676281</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.676281,45.408308,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ottawa Chinese Bible Church</name>
<description><![CDATA[latitude: 45.41234<br>longitude: -75.680081]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.41234</value>
</Data>
<Data name="longitude">
<value>-75.680081</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.680081,45.41234,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Canadian Bank Note Company</name>
<description><![CDATA[latitude: 45.395734<br>longitude: -75.745783]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.395734</value>
</Data>
<Data name="longitude">
<value>-75.745783</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.745783,45.395734,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Dominion Arboretum</name>
<description><![CDATA[latitude: 45.391174<br>longitude: -75.704042]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.391174</value>
</Data>
<Data name="longitude">
<value>-75.704042</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.704042,45.391174,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>BiTe This</name>
<description><![CDATA[latitude: 45.395077<br>longitude: -75.747579]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.395077</value>
</Data>
<Data name="longitude">
<value>-75.747579</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.747579,45.395077,0
</coordinates>
</Point>
</Placemark>
</Document>
</kml>
`;
#map {
height: 650px;
width: 100%;
}
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script src="https://cdn.rawgit.com/googlemaps/v3-utility-library/master/infobox/src/infobox.js"></script>
<script src="https://cdn.rawgit.com/googlemaps/v3-utility-library/master/markerclustererplus/src/markerclusterer.js"></script>
<script src="https://cdn.rawgit.com/geocodezip/geoxml3/master/polys/geoxml3.js"></script>
<div id="map"></div>
(1) 如何自定义markerclustererplus单独图标?编辑:我将图标自定义移动到为markerclusterer数组创建标记的位置,这似乎自定义了单个标记图标,但是,geoxml3解析中存在残留标记,我认为我需要防止在第一个中显示案例?
̶(̶2̶)̶ ̶I̶s̶ ̶t̶h̶e̶r̶e̶ ̶a̶ ̶w̶a̶y̶ ̶t̶o̶ ̶c̶r̶e̶a̶t̶e̶ ̶t̶h̶e̶ ̶m̶a̶r̶k̶e̶r̶ c̶l̶u̶s̶t̶e̶r̶e̶r̶p̶l̶u̶s̶̶a̶r̶r̶a̶y̶̶w̶i̶t̶h̶o̶u̶t̶̶u̶s̶i̶n̶g̶̶a̶̶c̶u̶s̶t̶o̶ m̶c̶r̶e̶a̶t̶e̶M̶a̶r̶k̶e̶r̶̶f̶u̶n̶c̶t̶i̶o̶n̶̶i̶n̶̶g̶e̶o̶x̶m̶l̶3̶̶p̶a̶r̶s̶e̶r̶ ?̶编辑:我通过创建标记数组并使用markerclusterer对象的.addMarkers方法解决了这个问题。 Fiddle 和 Snippet 已编辑为现在使用markerclustererplus。
最佳答案
MarkerClusterer 不会更改标记。您的代码正在使用要添加到 MarkerClusterer 的标记的默认图标。您的 createMarker
函数(来自您的 fiddle ,而不是您的代码片段)不会设置标记的 icon
属性,这意味着它会创建一个具有默认图标的标记:
createMarker:function(placemark){
var marker = new google.maps.Marker({position:placemark.latlng});
markerClusterer.addMarker(marker);
},
更正了 createMarker
函数(使用正确的图标):
createMarker: function(placemark) {
var marker = new google.maps.Marker({
position: placemark.latlng,
icon: {
url: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png", // url
scaledSize: new google.maps.Size(48, 48) // scaled size
}
});
markerClusterer.addMarker(marker);
},
代码片段:
var map;
var myParser;
var markerClusterer;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: 45.4,
lng: -75.7
},
zoom: 14
});
var infowindow = new google.maps.InfoWindow();
markerClusterer = new MarkerClusterer(map, [], {});
myParser = new geoXML3.parser({
map: map,
zoom: false,
singleInfowindow: true,
infoWindow: infowindow,
markerOptions: {
icon: {
url: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png", // url
scaledSize: new google.maps.Size(48, 48) // scaled size
}
},
createMarker: function(placemark) {
var marker = myParser.createMarker(placemark);
markerClusterer.addMarker(marker);
return marker;
},
afterParse: useData
});
myParser.parseKmlString(file2kml);
function useData(docs) {
console.log("parsed " + docs[0].placemarks.length + " placemarks");
}
}
google.maps.event.addDomListener(window, 'load', initMap);
var file2kml = `<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>test placemarks</name>
<Style id="icon-1899-DB4436-labelson">
<IconStyle>
<color>ff3644db</color>
<scale>1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/ms/icons/red-dot.png</href>
</Icon>
<hotSpot x="32" xunits="pixels" y="64" yunits="insetPixels"/>
</IconStyle>
</Style>
<Placemark>
<name>Church Of Ascension</name>
<description><![CDATA[latitude: 45.410755<br>longitude: -75.681623]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.410755</value>
</Data>
<Data name="longitude">
<value>-75.681623</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.681623,45.410755,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bank Street Dragon</name>
<description><![CDATA[latitude: 45.420032<br>longitude: -75.699788]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.420032</value>
</Data>
<Data name="longitude">
<value>-75.699788</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.699788,45.420032,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Place Bell Canada</name>
<description><![CDATA[latitude: 45.420214<br>longitude: -75.692603]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.420214</value>
</Data>
<Data name="longitude">
<value>-75.692603</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.692603,45.420214,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Royal Canadian Legion Dominion Command</name>
<description><![CDATA[latitude: 45.310682<br>longitude: -75.899762]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.310682</value>
</Data>
<Data name="longitude">
<value>-75.899762</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.899762,45.310682,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Lieutenant Colonel John By</name>
<description><![CDATA[latitude: 45.422076<br>longitude: -75.692515]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.422076</value>
</Data>
<Data name="longitude">
<value>-75.692515</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.692515,45.422076,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Oscar Peterson, the Street Musician</name>
<description><![CDATA[latitude: 45.42268<br>longitude: -75.693955]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.42268</value>
</Data>
<Data name="longitude">
<value>-75.693955</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.693955,45.42268,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Somerset Square</name>
<description><![CDATA[latitude: 45.406222<br>longitude: -75.722117]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.406222</value>
</Data>
<Data name="longitude">
<value>-75.722117</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.722117,45.406222,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Windsor Park Flood Control</name>
<description><![CDATA[latitude: 45.39149<br>longitude: -75.677548]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.39149</value>
</Data>
<Data name="longitude">
<value>-75.677548</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.677548,45.39149,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Frank Clair Statue</name>
<description><![CDATA[latitude: 45.397413<br>longitude: -75.683657]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397413</value>
</Data>
<Data name="longitude">
<value>-75.683657</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.683657,45.397413,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ottawa Mill St. Brewpub</name>
<description><![CDATA[latitude: 45.419537<br>longitude: -75.71263]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.419537</value>
</Data>
<Data name="longitude">
<value>-75.71263</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.71263,45.419537,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>David Perry Memorial Bench</name>
<description><![CDATA[latitude: 45.397002<br>longitude: -75.6743]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397002</value>
</Data>
<Data name="longitude">
<value>-75.6743</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.6743,45.397002,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Companions of the Cross</name>
<description><![CDATA[latitude: 45.412132<br>longitude: -75.70911]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.412132</value>
</Data>
<Data name="longitude">
<value>-75.70911</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.70911,45.412132,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Sunburst Building</name>
<description><![CDATA[latitude: 45.419296<br>longitude: -75.699572]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.419296</value>
</Data>
<Data name="longitude">
<value>-75.699572</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.699572,45.419296,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Rideau Curling Club</name>
<description><![CDATA[latitude: 45.413011<br>longitude: -75.704687]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.413011</value>
</Data>
<Data name="longitude">
<value>-75.704687</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.704687,45.413011,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Carling Otrain Station </name>
<description><![CDATA[latitude: 45.397474<br>longitude: -75.709528]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.397474</value>
</Data>
<Data name="longitude">
<value>-75.709528</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.709528,45.397474,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Geese Artwork</name>
<description><![CDATA[latitude: 45.417308<br>longitude: -75.700673]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.417308</value>
</Data>
<Data name="longitude">
<value>-75.700673</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.700673,45.417308,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name><![CDATA[Saint Patrick\'s Basilica]]></name>
<description><![CDATA[latitude: 45.41667<br>longitude: -75.70057]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.41667</value>
</Data>
<Data name="longitude">
<value>-75.70057</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.70057,45.41667,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Headless Elephants</name>
<description><![CDATA[latitude: 45.409045<br>longitude: -75.688275]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.409045</value>
</Data>
<Data name="longitude">
<value>-75.688275</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.688275,45.409045,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Valour Bridge</name>
<description><![CDATA[latitude: 45.310651<br>longitude: -75.901318]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.310651</value>
</Data>
<Data name="longitude">
<value>-75.901318</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.901318,45.310651,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Marble Soccer Balls</name>
<description><![CDATA[latitude: 45.404574<br>longitude: -75.711718]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.404574</value>
</Data>
<Data name="longitude">
<value>-75.711718</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.711718,45.404574,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Shrine To Mary.</name>
<description><![CDATA[latitude: 45.414046<br>longitude: -75.708891]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.414046</value>
</Data>
<Data name="longitude">
<value>-75.708891</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.708891,45.414046,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Guigues Hall Saint Paul University</name>
<description><![CDATA[latitude: 45.408308<br>longitude: -75.676281]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.408308</value>
</Data>
<Data name="longitude">
<value>-75.676281</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.676281,45.408308,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ottawa Chinese Bible Church</name>
<description><![CDATA[latitude: 45.41234<br>longitude: -75.680081]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.41234</value>
</Data>
<Data name="longitude">
<value>-75.680081</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.680081,45.41234,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Canadian Bank Note Company</name>
<description><![CDATA[latitude: 45.395734<br>longitude: -75.745783]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.395734</value>
</Data>
<Data name="longitude">
<value>-75.745783</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.745783,45.395734,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Dominion Arboretum</name>
<description><![CDATA[latitude: 45.391174<br>longitude: -75.704042]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.391174</value>
</Data>
<Data name="longitude">
<value>-75.704042</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.704042,45.391174,0
</coordinates>
</Point>
</Placemark>
<Placemark>
<name>BiTe This</name>
<description><![CDATA[latitude: 45.395077<br>longitude: -75.747579]]></description>
<styleUrl>#icon-1899-DB4436-labelson</styleUrl>
<ExtendedData>
<Data name="latitude">
<value>45.395077</value>
</Data>
<Data name="longitude">
<value>-75.747579</value>
</Data>
</ExtendedData>
<Point>
<coordinates>
-75.747579,45.395077,0
</coordinates>
</Point>
</Placemark>
</Document>
</kml>
`;
html,
body,
#map {
height: 100%;
width: 100%;
padding: 0px;
margin: 0px;
}
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script src="https://cdn.rawgit.com/geocodezip/geoxml3/master/polys/geoxml3.js"></script>
<script src="https://cdn.rawgit.com/googlemaps/v3-utility-library/master/markerclustererplus/src/markerclusterer.js"></script>
<div id="map"></div>
关于javascript - markclusterer 覆盖自定义单独的 geoxml3 标记图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50820055/
虽然我在 reactjs 组件(组件名称为 renderLocationLink)的渲染方法返回的 html 中包含了 a 标签的 onclick 处理程序,但渲染正确地发生了 onclick 处理程
我必须以 docx 格式存储一些文档,但无法忍受使用 msword:我想编辑某种纯文本标记,除了基于 XML 的东西(我也不喜欢那样)和从/到那个到/从 docx 转换。 有什么选择吗? 编辑:由于人
有一个页面,其 anchor 标记在延迟后变得可点击。我想使用用户脚本在可点击后点击它。 页面加载时,HTML 源代码为: Download 延迟一段时间后,#button 变
我正在将 XML 文件解析为 pandas 数据帧。使用下面的代码我可以成功获取所有内容,但是这使用了完整 XML 的编辑版本。完整的 XML 在主数据表之上有一堆摘要数据,请参阅完整的 XML he
目前我正在研究 xml.sax 解析器来解析 xml 文件 假设我有以下代码 filepath = 'users/file.xml' try: parser = xml.sax.make_pa
我正在尝试构建一种语法来解释用户输入的文本,搜索引擎风格。它将支持 AND、OR、NOT 和 ANDNOT bool 运算符。我几乎所有东西都在工作,但我想添加一个规则,将引用字符串之外的两个相邻关键
我遇到了 Terraform EKS 标记的问题,并且似乎没有找到可行的解决方案来在创建新集群时标记所有 VPC 子网。 提供一些上下文:我们有一个 AWS VPC,我们在其中将多个 EKS 集群部署
我是xpath的新手,对此了解不多。我知道有一种方法可以使用xpath在xml / xhtml文件中查找特定标签。就我而言,我试图找到第一个(a)链接元素。不幸的是,我的xpath字符串[// a [
我在索引页上的产品卡上遇到问题。在产品卡内部,我有 Vue 组件来渲染表单(数量和添加到购物车按钮)。当我单击“添加到购物车”按钮时,我得到了预期的结果。响应被发送到根 vue 组件,然后我看到产品已
html setMouse(true)} onMouseEnter={() => setMouse(false)} className='resume-container'> CSS .resum
我在组件中有一组枚举,如下所示: type TOption = (clVisible, clVisibleAlways, clRenderable, clEditable); TOptions
是否有出于性能考虑的javadoc标签? 人们可以想象: /** * ...other javadoc tags... * @perform Expected to run in O(n) tim
html setMouse(true)} onMouseEnter={() => setMouse(false)} className='resume-container'> CSS .resum
我有一个包含多个小子图的图。目标是当且仅当子图中的所有节点都是蓝色时,才将子图中的所有蓝色节点标记为红色。如果子图中的一个节点具有不同的颜色,绿色,那么我们将不会更改该子图中节点的颜色。 这是我正在使
我正在使用 json-ld 开发事件标记以包含在确认电子邮件中。 我的一些事件会定期重复发生。但是,最新的 Schema.org 规范不支持重复发生的事件,因此我遵循了此处提供的建议:http://l
我创建了一个插件,可以添加带有相应行号的标记。现在,这很棒,因为它现在显示在“标记” View 中。有没有办法当我双击标记上的一行时,它会转到标记指示的行? 谢谢。 最佳答案 双击“标记” View
是否有一个插件具有与 Facebook 标记类似的行为? 它的特别之处在于它具有: 在键入的单词之间自动完成 特殊输出的 html(与另一个输入字段同步) 最佳答案 您可以使用jquery提及输入pl
有没有更好的方法来读取java文件中的 token ?我目前正在使用 StringTokenizer 来分割 token 。但在大多数情况下,它的效率可能非常低,因为您必须逐个 token 地读取 t
我想知道是否有某种方法可以标记文件来识别该文件是否包含x。 考虑以下示例: 在批量转换过程中,我正在创建一个日志文件,其中列出了各个转换的成功/失败。 所以流程如下: 开始转换过程 创建名为batch
我一直在尝试模拟点击标签,但这并没有像我需要的那样工作。我的 anchor 标记看起来像这样 Download this pic 正常的 $("a").click() 或 trigger('cli
我是一名优秀的程序员,十分优秀!