"site": "http://surveyor.mydns.jp/osm-data/",
1 parent dc30109 commit bec9cc8715f0c1cde437291e0b136fee1f23bc7a
@haya4 haya4 authored on 23 Jun 2022
Showing 3 changed files
View
9
index.js
$.when(
$.getJSON("index.json")
).done(function(data) {
site = data.site;
style = new ol.style.Style({
image: new ol.style.Icon({
src: site + 'lib/img/osm_200x200.png',
anchor: [0.5, 0.5],
scale: 0.2
}),
stroke: new ol.style.Stroke({color: '#ff33ff', width: 10})
});
 
$(data.list).each(function() {
var feature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat(this.coordinates)),
code: this.code,
View
2
■■■
index.json
{
"site": "./",
"site": "http://surveyor.mydns.jp/osm-data/",
"list": [
{"code": "01100", "name": "北海道 札幌市", "path": "01100_sapporo-shi_2020", "coordinates":[141.35477,43.06172]},
{"code": "11230", "name": "福島県 郡山市", "path": "07203_koriyama-shi_2020", "coordinates":[140.33421,37.40464]},
{"code": "07204", "name": "福島県 いわき市", "path": "07204_iwaki-shi_2020", "coordinates":[140.8893,37.0501]},
View
index2.js