Enhancement #879

Add ability to expose a map context configuration in json

Added by Portier Thomas over 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:12/11/2014
Priority:HighDue date:
Assignee:-% Done:

0%

Category:MAP
Target version:4.2.8
Sponsor: Ergonomic impact:

-

Functional impact:

-


Description

In order to use a map context in an other technology than gxp, we propose to expose the map configuration in json.
In order to do that we have to create a new view.json.php in the map view. We can access it adding format=json to the url

The json format will look like :

{"status":"success","data":{"id":"1","name":"Tigeo","title":"Tigeo","srs":"EPSG:3857","maxresolution":"156543.03390625","numzoomlevel":null,"maxextent":"-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428","restrictedextent":"170905.21,5370392.21,326772.86,5496529.28","centercoordinates":"246592,5431536","zoom":"9","unit":"m","tools":[{"id":"1","alias":"googleearth","params":null},{"id":"2","alias":"navigation","params":null},{"id":"3","alias":"zoom","params":null},{"id":"4","alias":"navigationhistory","params":null},{"id":"5","alias":"zoomtoextent","params":null},{"id":"6","alias":"measure","params":null},{"id":"10","alias":"removelayer","params":null},{"id":"11","alias":"layerproperties","params":null},{"id":"12","alias":"getfeatureinfo","params":"html"},{"id":"13","alias":"layertree","params":null},{"id":"14","alias":"scaleline","params":"{\\\"bottomInUnits\\\" :\\\"\\\",\\\"bottomOutUnits\\\" :\\\"\\\",\\\"topInUnits\\\" :\\\"m\\\",\\\"topOutUnits\\\" :\\\"km\\\"}"},{"id":"15","alias":"mouseposition","params":null},{"id":"16","alias":"wfslocator","params":"{\\\"urlwfslocator\\\" :\\\"http:\/\/lebouzin\/proxy_tigeo\/wfs-tigeo\\\",\\\"fieldname\\\" :\\\"NOM_COMM\\\",\\\"featuretype\\\" :\\\"communes_tarn_3857\\\",\\\"featureprefix\\\" :\\\"tigeo\\\",\\\"geometryname\\\" :\\\"the_geom\\\"}"},{"id":"17","alias":"searchcatalog","params":"1"},{"id":"18","alias":"layerdetailsheet","params":null},{"id":"19","alias":"layerdownload","params":null},{"id":"20","alias":"layerorder","params":null}],"groups":[{"id":"1","alias":"fonds-de-plan","ordering":"1","name":"Fonds de plan","isbackground":"1","isdefault":"0","layers":[{"id":"1","alias":"openstreetmap","ordering":"1","name":"OpenStreetMap","servicetype":"physical","layername":"mapnik","istiled":"0","isdefaultvisible":"0","opacity":"1.00","asOL":"0","asOLstyle":"","asOLmatrixset":"","asOLoptions":"","metadatalink":"","attribution":"","serviceurl":"http:\/\/openstreetmap.org\/","serviceconnector":"OSM","servicealias":"OSM","version":null}]},{"id":"3","alias":"autre","ordering":"3","name":"Autre","isbackground":"0","isdefault":"1","layers":[]},{"id":"2","alias":"mipygeo","ordering":"2","name":"Mipygeo","isbackground":"0","isdefault":"0","layers":[{"id":"2","alias":"scot-de-midi-pyrenee","ordering":"2","name":"SCOT de Midi-Pyrenees","servicetype":"physical","layername":"scot_mp","istiled":"0","isdefaultvisible":"0","opacity":"0.70","asOL":"0","asOLstyle":"","asOLmatrixset":"","asOLoptions":"","metadatalink":"http:\/\/www.mipygeo.fr\/geonetwork\/apps\/search\/index.html?uuid=89bed9db-26a6-4f50-9471-a198932fe1a4","attribution":"<img src=\"https:\/\/test.geoplateforme17.fr\/images\/logos\/logo_partenaires\/erdf.jpg\" height=\"60px\" \/>\u00a9 ERDF 2014","serviceurl":"http:\/\/carto.mipygeo.fr\/cgi-bin\/mapserv?","serviceconnector":"WMS","servicealias":"mipygeo","version":"1.3.0"},{"id":"2","alias":"scot-de-midi-pyrenee","ordering":"2","name":"SCOT de Midi-Pyrenees","servicetype":"physical","layername":"scot_mp","istiled":"0","isdefaultvisible":"0","opacity":"0.70","asOL":"0","asOLstyle":"","asOLmatrixset":"","asOLoptions":"","metadatalink":"http:\/\/www.mipygeo.fr\/geonetwork\/apps\/search\/index.html?uuid=89bed9db-26a6-4f50-9471-a198932fe1a4","attribution":"<img src=\"https:\/\/test.geoplateforme17.fr\/images\/logos\/logo_partenaires\/erdf.jpg\" height=\"60px\" \/>\u00a9 ERDF 2014","serviceurl":"http:\/\/carto.mipygeo.fr\/cgi-bin\/mapserv?","serviceconnector":"WMS","servicealias":"mipygeo","version":"1.3.0"}]}],"sitename":"Tigeo"}}


Related issues

Related to easySDI - Feature #981: Adding a leaflet map type Closed 04/07/2015

History

#1 Updated by Magoni Bruno over 4 years ago

  • Status changed from New to Request For Comments

#2 Updated by Magoni Bruno over 4 years ago

  • Assignee changed from Technical Committee to Portier Thomas
Thanks Thomas to verify that such json service has a similar behaviour than a MAP about restrictions:
  • access to json service must follow Joomla's right (like a MAP component)
  • content of json must follow easySDI's right (like what is returned for building MAP component interface)

#3 Updated by Portier Thomas over 4 years ago

  • Target version set to 171

Yes it's ok for the rights. Bruno could you change the status of this issue to affected?

#4 Updated by Portier Thomas over 4 years ago

  • Assignee changed from Portier Thomas to Magoni Bruno

to me

#5 Updated by Magoni Bruno over 4 years ago

  • Assignee changed from Magoni Bruno to Technical Committee

Hi Thomas,

Thanks for your verification!
Before affecting such realization, current process need to assign such new feature to Technical Comittee; what I'm doing right now...

If TC doesn't need further explanations, then it could be accepted at next TC meeting.

Thanks
Bruno

#6 Updated by Magoni Bruno over 4 years ago

  • Target version deleted (171)

#7 Updated by Portier Thomas over 4 years ago

  • Priority changed from Normal to High

#8 Updated by Van Hoecke Hélène over 4 years ago

TC OK.

#9 Updated by Van Hoecke Hélène over 4 years ago

  • Assignee changed from Technical Committee to Magoni Bruno

Thanks to assign it to Thomas.

#10 Updated by Magoni Bruno over 4 years ago

  • Tracker changed from Feature to Enhancement
  • Status changed from Request For Comments to Accepted
  • Assignee changed from Magoni Bruno to Portier Thomas
  • Target version set to Unplanned

I agree that it's an enhancement instead of a feature.
So I assign it to Thomas as you've decide it during TC session.

#11 Updated by Magoni Bruno over 4 years ago

  • Status changed from Accepted to Affected

#12 Updated by Portier Thomas over 4 years ago

  • Status changed from Affected to Resolved

#13 Updated by Magoni Bruno over 4 years ago

#14 Updated by Van Hoecke Hélène over 4 years ago

  • Target version changed from Unplanned to 4.2.8

#15 Updated by Van Hoecke Hélène over 4 years ago

  • Status changed from Resolved to Closed

#16 Updated by Van Hoecke Hélène almost 4 years ago

  • Assignee deleted (Portier Thomas)
  • Functional impact set to -
  • Ergonomic impact set to -

Also available in: Atom PDF