OpenLayers

Deepzoom into OpenLayers images using zoomify

旧时模样 提交于 2020-03-25 23:49:16
问题 How do I deepzoom into OpenLayers images using Zoomify? Taking cues from the answer How to display high resolution image in browser using openlayers, I was able to implement the zooming function but the maxZoom does not work here and I am unable zoom further into the image. DZI image parser function loadUrl(url, opt_options) { const options = opt_options || {}; const crossOrigin = options.crossOrigin === undefined ? 'anonymous' : options.crossOrigin; const layer = new ol.layer.Tile(); const

Rails passing variable to jBuilder

巧了我就是萌 提交于 2020-03-25 19:04:53
问题 Fixed and solutions incorporated into the OP. A combination of comments by @max here and to my related posting Rails connecting to jBuilder. Edits are with // Was: I'm trying to get values through a has_many :through relationship. Three main databases: people, locations (which has street address and other information), and the join table, years which links the person to a particular address on a specific date. # models/person.rb class Person < ApplicationRecord has_many :years, dependent:

Rails passing variable to jBuilder

微笑、不失礼 提交于 2020-03-25 19:04:20
问题 Fixed and solutions incorporated into the OP. A combination of comments by @max here and to my related posting Rails connecting to jBuilder. Edits are with // Was: I'm trying to get values through a has_many :through relationship. Three main databases: people, locations (which has street address and other information), and the join table, years which links the person to a particular address on a specific date. # models/person.rb class Person < ApplicationRecord has_many :years, dependent:

Rails passing variable to jBuilder

亡梦爱人 提交于 2020-03-25 19:04:05
问题 Fixed and solutions incorporated into the OP. A combination of comments by @max here and to my related posting Rails connecting to jBuilder. Edits are with // Was: I'm trying to get values through a has_many :through relationship. Three main databases: people, locations (which has street address and other information), and the join table, years which links the person to a particular address on a specific date. # models/person.rb class Person < ApplicationRecord has_many :years, dependent:

Coding and Paper Letter(八十)

会有一股神秘感。 提交于 2020-03-25 06:10:56
3 月,跳不动了?>>> 新一期资源整理。 1 Coding: 1.城市模拟综合。 UrbanSimulationSynthesis 2.基于 bookdown 的 ElegantBook。 ElegantBookdown 3.R语言包lifecycle,生命周期提供了一组工具和约定来管理导出功能的生命周期。 lifecycle 4.学习GitHub注册的基础知识,进行首次回购,上传文档/文件,分支,合并和拉取请求均在.ppt文档中进行了讨论 lunch and learn GitHub Basics ppt 5.这是MSU的PLP 847小组项目,由Greg Bonito教授。团队成员包括:Melini Jayawardana Austin McCoy Mitch Roth丽贝卡·谢伊。 TarSpot of Corn 6.弯嘴滨鹬和红颈滨鹬的迁徙方式和后果。 CurlewSands RedNStints 7.R语言包varstan,Varstan是一个使用哈密顿蒙特卡洛方法对结构化时间序列模型进行贝叶斯估计的软件包,该方法由Stan(一种C ++的概率语言模型)实现。 varstan 8.这是一个客户端库,可用于检测Python应用程序的分布式跟踪收集,并将这些跟踪发送到Jaeger。有关更多详细信息,请参见OpenTracing Python API。 jaeger

OpenLayers View center of rotation

白昼怎懂夜的黑 提交于 2020-03-24 00:03:37
问题 I am preparing a map application using OpenLayers. My customer wants to have his position displayed at bottom of the screen and he wants the map to rotate around him. As far as I know, positioning the map is done using ol.View.setCenter(coordinates) and rotation is done using ol.view.setRotation(radians) So, is there a way, how to set center / rotation origin pixel or Mr. Pythagoras calculation has to be done any time the map should be moved / rotated? 回答1: The easiest way would be to use CSS

Openlayers 2.X加载天地图

夙愿已清 提交于 2020-03-23 14:38:37
概述: 在前面的章节,讲到了Arcgis for js加载天地图,在本节讲述如何在Openlayers 2.X的版本中加载天地图,并添加自己的wms服务。 效果: 地图 影像 地形 去掉本地wms 实现: 1、天地图服务 在天地图的官方网站上,我们可以看到如下所示的: 页面上列出了我们可调用的图的url,网站地址为:http://www.tianditu.com/guide/index.html。 2、加载天地图 在openlayers中加载天地图可用OpenLayers.Layer.XYZ来实现,在此,我将之封装成了两个函数,getBaseLayer和getAnnoLayer,分别实现基础底图和标注图层,代码如下: function getBaseLayer(layername, layer){ return new OpenLayers.Layer.XYZ( layername, [ "http://t0.tianditu.com/DataServer?T="+layer+"&X=${x}&Y=${y}&L=${z}", "http://t0.tianditu.com/DataServer?T="+layer+"&X=${x}&Y=${y}&L=${z}", "http://t0.tianditu.com/DataServer?T="+layer+"&X=${x}&Y=${y}

Openlayers地图量算功能

笑着哭i 提交于 2020-03-23 14:37:22
http://openlayers.org/en/latest/examples/measure.html?q=measure 按官网的例子来就行,新建对象时注意加上命名空间 var vector = new VectorLayer({ source: source, style: new Style({ fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }), stroke: new Stroke({ color: '#ffcc33', width: 2 }), image: new CircleStyle({ radius: 7, fill: new Fill({ color: '#ffcc33' }) }) }) }); 1、vector 图层是用来保存量算结束后所画矢量的图层,一定要放到最上方,否则只能看到结果看不到所量算的范围 2、目前的量算是基于EPSG:3857的,而不是EPSG:4326(wgs84) 来源: https://www.cnblogs.com/songhuanzhao/p/10153998.html

Rails Leaflet Webpack blank page

情到浓时终转凉″ 提交于 2020-03-23 08:08:10
问题 This a continuation of a related problem that @rossta fixed part of, but now the problem is moved so thought I'd start over. No errors and the script is completing (verified by console.log outputs in the script). The body element shows up. This worked with gem leaflet and now webpack in Rails 5.2, but not now in Rails 6 with webpack I moved the script into the page to isolate the problem map/index.html.erb <p id="notice"><%= notice %></p> <% provide(:title, 'Map') %> <h4>This is map/index

openlayers 删除点 ol/source/Vector.js.VectorSource.removeFeature解决方案

安稳与你 提交于 2020-03-12 10:46:11
背景:openlayers 实现地图打点,根据数据的变化修改点的位置 data // 点的经纬度 coordinates : [ // { x: 37.12638163, y: 15.1353712537 }, // { x: 82.56253054272383, y: 42.63299560546875 }, // { x: 87.52801179885864, y: 44.15955126285553 } ] methods /** * 批量添加坐标点 */ handleAddBatchFeature ( ) { const _that = this ; // 设置图层 _that . flagLayer = new VectorLayer ( { source : new VectorSource ( ) } ) ; _that . map . addLayer ( _that . flagLayer ) ; // 循环添加feature for ( let i = 0 ; i < this . coordinates . length ; i ++ ) { // 创建feature let feature = new Feature ( { geometry : new Point ( [ _that . coordinates [ i ] . x , _that .