POST
|
Hi, Is there a way to display points where the lat/long comes from an Oracle table? My client has an MXD where they used an OLE DB connection to get point data stored in an Oracle table and display it on a map. Now, we would like to display this same data in our silverlight map application. How do we go about doing this? Thanks, Paul
... View more
05-21-2013
09:48 AM
|
0
|
3
|
630
|
POST
|
Hi, Has anyone been able to display a WMTS service in OpenLayers? I have been trying for several days without success. OpenLayers 2.12 ArcGIS Server 10.1 Capabilities: http://geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/CBCT3978/MapServer/WMTS? Here is some of the code I have tried:
<!-- OpenLayers Start -->
<script type="text/javascript" src="js/proj4js-compressed.js"></script>
<script type="text/javascript" src="js/OpenLayers.js"></script>
<script type="text/javascript">
// Add projection
Proj4js.defs["EPSG:3978"] = "+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
var options2 = {
div: "geomap2",
theme: null,
controls: [
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.TouchNavigation({
dragPanOptions: {
enableKinetic: true
}
})
],
maxExtent: new OpenLayers.Bounds(4926564.35035694, -5396818.737236813, 5347435.64964306, 4659495.9082),
maxResolution: "auto",
projection: "EPSG:3978",
restrictedExtent: new OpenLayers.Bounds(4926564.35035694, -5396818.737236813, 5347435.64964306, 4659495.9082),
units: 'm',
displayProjection: new OpenLayers.Projection("EPSG:4269"),
numZoomLevels: 18
};
// map2 is the map used to define an extent using the map (option c)
map2 = new OpenLayers.Map("geomap2", options2);
var styleBBOX = new OpenLayers.Style({
'fillOpacity':0.05,
'fillColor':'#008000',
'strokeColor':'#008000',
'strokeWidth':1
});
bboxLayer2 = new OpenLayers.Layer.Vector("BBOX_Overlay2",{styleMap: styleBBOX});
var pzb2 = new OpenLayers.Control.PanZoomBar({'div':OpenLayers.Util.getElement('panzoombar2'), zoomStopHeight: 8})
pzb2.position=new OpenLayers.Pixel(210,0);
currentLayer2 = "lowContrast";
// If tile matrix identifiers differ from zoom levels (0, 1, 2, ...)
// then they must be explicitly provided.
var matrixIds = new Array(18);
for (var i=0; i<18; ++i) {
matrixIds = "EPSG:3978:" + i;
}
var wmts = new OpenLayers.Layer.WMTS({
name: "BaseMaps_CBCT3978",
url: "BaseMaps_CBCT3978",
layer: "BaseMaps_CBCT3978",
singleTile: false,
//matrixSet: "CBCT3978",default028mm
matrixSet: "default028mm",
matrixIds: matrixIds,
format: "image/jpg",
// //requestEncoding: "REST",
requestEncoding: "KVP",
style: "default",
opacity: 0.7,
isBaseLayer: true
});
map2.addLayer(wmts);
This generates URLs of the form:
http://dev.geogratis.gc.ca/demo_wet3/BaseMaps_CBCT3978?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=BaseMaps_CBCT3978&STYLE=default&TILEMATRIXSET=default028mm&TILEMATRIX=EPSG%3A3978%3A0&TILEROW=1&TILECOL=0&FORMAT=image%2Fjpg
and those URLs give me 404 errors. Can anyone spot the problem? Thanks, Paul
... View more
04-29-2013
04:35 AM
|
0
|
0
|
4984
|
POST
|
Hi, Another thing I noticed, is that if you check the "Use layer names from the map document" for the WMS capabilities of the service and then try using the layer names instead of using the layer numbers, you get nothing back. Why can't we use the layer names? Forget about this post, I found my problem, it was a typo! It does work with layer names
... View more
02-03-2012
05:38 AM
|
0
|
0
|
867
|
POST
|
Hi, Another thing I noticed, is that if you check the "Use layer names from the map document" for the WMS capabilities of the service and then try using the layer names instead of using the layer numbers, you get nothing back. Why can't we use the layer names?
... View more
02-03-2012
05:30 AM
|
0
|
0
|
867
|
POST
|
Hi, I got something working. In my application, if I have a regular dynamic service using the same projection as the first layer and then add the WMS service after, it works and the WMS service shows up. Before, my first service was not an EPSG 102002 service, but a modified Lambert projection. Does it mean that I must absolutely have a service using the same projection as the WMS service as my first layer for WMS service to show up?
... View more
02-03-2012
04:21 AM
|
0
|
0
|
867
|
POST
|
Hi, I am having issues trying to get WMS layers to display also. I have defined a test service using a Canada Lambert COnformal Conic (EPSG 102002) projection and enabled WMS for it. Then, in my Silverlight application, I try to add it to the map in code using:
case"wms":
var wmsLayer = newWmsLayer();
wmsLayer.Url = "http://s5-bsc-ims2.nrn.nrcan.gc.ca/ArcGIS/services/testwms1/MapServer/WMSServer";
wmsLayer.ID = "Test WMS Service";
wmsLayer.Layers = new string[] { "0" };
wmsLayer.Visible = true;
wmsLayer.SkipGetCapabilities = true;
wmsLayer.SupportedSpatialReferenceIDs= new int[] { 102002 };
wmsLayer.Version="1.3.0";
layers.Add(wmsLayer);
break;
Later in the code, the layers list is added to the map. In fiddler, when it tries to load the WMS service, I see the following:
GET /ArcGIS/services/testwms1/MapServer/WMSServer?SERVICE=WMS&REQUEST=GetMap&WIDTH=1071&HEIGHT=746&FORMAT=image/png&LAYERS=0&STYLES=&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&VERSION=1.3.0&CRS=EPSG:0&BBOX=-3600246.41388271,-936638.5,4433553.57338271,4659267 HTTP/1.1
This generates an error I can see in Fiddler because it is requesting the service using EPSG code 0 instead of 102002!!!
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><ServiceExceptionReport version="1.3.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code="InvalidCRS">
Parameter 'crs' contains unacceptable value.
</ServiceException>
</ServiceExceptionReport>
So, why is the application sending an EPSG code of 0 when I asked it to use 102002? Paul
... View more
02-03-2012
04:00 AM
|
0
|
0
|
867
|
POST
|
Ok, after trying again, I got your solution to behave like you said. So, it must be something we did when we ported it in our MVVM model.
... View more
01-19-2012
08:04 AM
|
0
|
0
|
424
|
POST
|
Yes, that is what I am talking about. Maybe I need to download your solution again, because the one I have does not seem to do that. Is the latest version still in the code gallery? Or maybe I should download from your site if you have a URL for it?
... View more
01-19-2012
07:49 AM
|
0
|
0
|
424
|
POST
|
Yes, I realized that after you open the print preview, if you play with the legend it will not be reflected in the preview, which is fine. But as soon as you open the print preview, the legend in it does not match want you see currently in the application. Is there a way to at least show the legend as you see it before pressing the print preview button?
... View more
01-19-2012
06:57 AM
|
0
|
0
|
424
|
POST
|
Hi Dominique, I got things working quite some time ago, but I have a different question now. When I hit the print button, and printing with a legend, the legend shown in the preview does not match the legend in its current state of the application. I was looking at your original solution, and it does the same thing in yours. Looking at your code, you set a "Flat" legend mode and the legend always looks the same no matter what you do to in the application legend. Is there a way to reflect you you do in the application legend in the print preview legend? That is, if a service is open or closed in the legend it would be open or closed also in the print preview. Thanks, Paul
... View more
01-19-2012
04:52 AM
|
0
|
0
|
424
|
POST
|
Yes, that is true. My question was more in the case where I would need to do something more complicated where I would require more information to do would be needed.
... View more
11-16-2011
02:31 AM
|
0
|
0
|
337
|
POST
|
Found a way to do what I wanted with only one parameter. But I am still interested to know if we can have more than one parameter.
... View more
11-15-2011
04:10 AM
|
0
|
0
|
337
|
POST
|
Question about the converter: When I look at the samples, the converter is defined as:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value is GraphicsLayer ? Visibility.Visible : Visibility.Collapsed;
}
Is it possible to have more than one parameter? Can I do something like:
public object Convert(object value, Type targetType, object parameter1, object parameter2, System.Globalization.CultureInfo culture)
{
// do something using the parameters which would set a visibility variable
return visibility //return the value of my variable
}
and in my XAML, I would have something like:
<CheckBox Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}"
Visibility="{Binding Layer, Converter={StaticResource VisConverter}, ConverterParameter=Layer, ConverterParameter='a string here'} " >
</CheckBox>
... View more
11-15-2011
03:55 AM
|
0
|
0
|
337
|
POST
|
Thanks both of you. I will start on building a converter. Always something new to learn! Paul
... View more
11-15-2011
03:15 AM
|
0
|
0
|
337
|
Title | Kudos | Posted |
---|---|---|
7 | 04-10-2014 09:59 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|