Enter Google map with gvNix

1

I would like to know what I should consider if I want to include a Google map in my project as a base.

From what I understand when executing the following command:

web mvc geo controller --class ~.web.MapController --preferredMapping map

The base geoportal includes by default a layer with the cartography of "Open Street Maps", I would like that map to be Google Streets.

    
asked by Marty Ayala 10.02.2016 в 15:19
source

1 answer

0

This type of layer is currently not supported in gvNIX.

If there is a leaflet plugin that allows you to add it ( in this post they explain how to do it for a page with loose leaflet), but if you include it in your gvNIX generated map you will have to do it by hand (using JavaScript) and it will not be integrated with the tools provided by gvNIX (like management in the TOC).

To integrate it, a new type of gvNIX layer should be generated. This is possible to do but it is not too simple. The steps would be:

  • Generate a new .tagx to manage it based on Tile's, for example.
  • Generate the javaScript class registered in the object GvNIX_Map_Leaflet.LAYERS (example of Tile layer ) in a new file .js
  • Register the new .js in the file load-scripts.tagx
  • use the new tag within the page .jspx of the page.

Depending on your knowledge in all this (JavaScript, jsp) it can be a bit complex or very difficult.

Good luck!

    
answered by 11.02.2016 / 13:36
source