I am new to GIS world and trying to incorporate OpenLayers with GML or SVG.

I am building a map engine and one of the features should be support of indoor maps. It can be accomplished with a static image, but I got a requirement that the engine has to understand vector format, the main reason is to keep a good quality when you zoom in or zoom out.

Common use case: the client has an indoor map (floor plan) made in AutoCAD, so it can be exported to GIS formats.

I do not understand how to make it work. I should define the projection but I have no clue which number should be assigned if I only want to show my floor. Regarding the static image, I could create a custom projection, but how to deal with GML?

To be honest I can do it with SVG if someone helps me to correctly set up the image size because now it shows the only limited part of the image.

I read SVG data

 viewBox="0 0 1024 768"

and set extent accordingly

var extent = [0, 0, 1024, 768]

besides that, I pointed out the image size

 imageSize: [1024, 768]

it seems to be a trivial task, but not for me.

I prepared demo (wait a few seconds until it loads SVG file)

UPD: I managed to make it work with SVG, but anyway it looks blurry when zoom in and image located not in the center

  • Maybe better switch to Leaflet. It seems to be more friendly for front end developers – SunDay Jul 18 '18 at 18:24

Your Answer

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

Browse other questions tagged or ask your own question.