2

I have an mxd file. Each time I share/publish a WMS service to the ArcGIS server as WMS, random numbers are added to the layer name. For example here is added number 8950 at the end of the <Name> tag. Even though the original name is down in the title and there is no number at the end. I pair these services with other services by layer name and need to prevent ArcGIS to add random numbers to the names and let them stay as they are.

<Layer queryable="1">
<Name>Povodeň_z_topiaceho_sa_snehu_gc8950</Name>
<Title>
<![CDATA[ Povodeň z topiaceho sa snehu gc ]]>
</Title>

I also checked the checkbox Use layer names from the map document.

I don't know what else to do to prevent this from happening...

0

After some research I still don't know why this happens, but a way to avoid this is to stop using diacritics in layer names as shown in the example.

When I changed the layer name in the mxd file to "povoden_z_topiaceho_sa_snehu_gc", the generated layer names are without numbers, so, to say, are OK. But why this happens I do not know in fact.

Also there was a problem querying the WMS by layer name where there was a space used in the layer name, so I also had to replace all the spaces by "_".

| improve this answer | |
  • 1
    It is generally bad practice to use any spaces in layer names as this can be interpret by a system/environment as a list of strings instead of 1 string. So best practice is to always use "_". It might be due to some internal processes that special characters are differently translated. Could be that it only accepts ASCII symbols. – MarcM Oct 14 at 13:38
  • The AG itself turns the spaces into "_" in the layer name, so I would expect it to work that way, but it doesn't work either way. Also it accepts the diacritics but then adds strange numbers. So I agree that it is a bad practice, but when it's allowed, it should be handled in the way, that it works. Adding ranbom numbers is pretty strange and unexpected behavior. (well we wanted to use the layer name as a layer name in the application without the need to store additional info in the app itself, that's why I used the diacritis. And to use the description for further description, not name.) – Mochi Oct 14 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.