Hi,
I want to add "Bing Map Road" to background maps.
Bing Map Aerial is already defined so i copied and changed codes in these 3
files.
OwsContextService.js ( /opt/tomcat/webapps/geonetwork
/catalog/components/viewer/owscontext)
mapService.js ( /opt/tomcat/webapps/geonetwork
/catalog/components/common/map)
configViewer.xml ( /opt/tomcat/webapps/geonetwork
/WEB-INF/data/data/resources/map)
I deleted both of the server cache files and browser than restart the
tomcat.
I was able to see Bing Map Road on viewer but after refresing the page it
was disappeared.
Are there any other files to change ?
* How can i add my own maps?
Also, i couldn't be able to change center of the map from config.js What is
missing?
(/views/default/config.js )
Thank you
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-background-maps-to-viewer-tp5299303.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
Hi,
The context is saved on window closing.
So, i think you only make the OWSContextService to read your bing layer,
but maybe you forgot the writing part ?
On Fri, Dec 9, 2016 at 7:34 AM, hakanatak <hakanatak@anonymised.com> wrote:
Hi,
I want to add "Bing Map Road" to background maps.
Bing Map Aerial is already defined so i copied and changed codes in these 3
files.
OwsContextService.js ( /opt/tomcat/webapps/geonetwork
/catalog/components/viewer/owscontext)
mapService.js ( /opt/tomcat/webapps/geonetwork
/catalog/components/common/map)
configViewer.xml ( /opt/tomcat/webapps/geonetwork
/WEB-INF/data/data/resources/map)
I deleted both of the server cache files and browser than restart the
tomcat.
I was able to see Bing Map Road on viewer but after refresing the page it
was disappeared.
Are there any other files to change ?
* How can i add my own maps?
Also, i couldn't be able to change center of the map from config.js What is
missing?
(/views/default/config.js )
Thank you
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/Adding-background-maps-to-viewer-tp5299303.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork
--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS
*Florent Gravin*
0479444492
Here is my OWSContextService.js file.I only added the bold code.
(290-322)
if (source instanceof ol.source.OSM) {
name = '{type=osm}';
} else if (source instanceof ol.source.MapQuest) {
name = '{type=mapquest}';
} else if (source instanceof ol.source.BingMaps) {
name = '{type=bing_aerial}';
* }else if (source instanceof ol.source.BingMaps) {
name = '{type=bing_road}';*
} else if (source instanceof ol.source.Stamen) {
name = '{type=stamen,name=' + layer.getSource().get('type') +
'}';
} else if (source instanceof ol.source.WMTS) {
name = '{type=wmts,name=' + layer.get('name') + '}';
params.server = [{
onlineResource: [{
href: layer.get('urlCap')
}],
service: 'urn:ogc:serviceType:WMS'
}];
} else if (source instanceof ol.source.ImageWMS) {
var s = layer.getSource();
name = s.getParams().LAYERS;
params.server = [{
onlineResource: [{
href: s.getUrl()
}],
service: 'urn:ogc:serviceType:WMS'
}];
} else {
return;
}
params.name = name;
resourceList.layer.push(params);
});
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-background-maps-to-viewer-tp5299303p5299318.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
Remove the first if statement ?
else if (source instanceof ol.source.BingMaps) {
name = '{type=bing_aerial}';
}
On Fri, Dec 9, 2016 at 9:30 AM, hakanatak <hakanatak@anonymised.com> wrote:
Here is my OWSContextService.js file.I only added the bold code.
(290-322)
if (source instanceof ol.source.OSM) {
name = '{type=osm}';
} else if (source instanceof ol.source.MapQuest) {
name = '{type=mapquest}';
} else if (source instanceof ol.source.BingMaps) {
name = '{type=bing_aerial}';
* }else if (source instanceof ol.source.BingMaps) {
name = '{type=bing_road}';*
} else if (source instanceof ol.source.Stamen) {
name = '{type=stamen,name=' + layer.getSource().get('type') +
'}';
} else if (source instanceof ol.source.WMTS) {
name = '{type=wmts,name=' + layer.get('name') + '}';
params.server = [{
onlineResource: [{
href: layer.get('urlCap')
}],
service: 'urn:ogc:serviceType:WMS'
}];
} else if (source instanceof ol.source.ImageWMS) {
var s = layer.getSource();
name = s.getParams().LAYERS;
params.server = [{
onlineResource: [{
href: s.getUrl()
}],
service: 'urn:ogc:serviceType:WMS'
}];
} else {
return;
}
params.name = name;
resourceList.layer.push(params);
});
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/Adding-background-maps-to-viewer-tp5299303p5299318.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork
--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS
*Florent Gravin*
0479444492
No, i didnt. I checked all codes son the file. This is the default file and
I only added the bold statement.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-background-maps-to-viewer-tp5299303p5299372.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
it nevers get into your else if statement as it goes in the previous one
......
On Fri, Dec 9, 2016 at 2:43 PM, hakanatak <hakanatak@anonymised.com> wrote:
No, i didnt. I checked all codes son the file. This is the default file and
I only added the bold statement.
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/Adding-background-maps-to-viewer-tp5299303p5299372.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
geonetwork-users List Signup and Options
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork
--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS
*Florent Gravin*
0479444492