Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for loading features via ProtocolProxy #318

Merged
merged 3 commits into from
Nov 27, 2014

Conversation

chrismayer
Copy link
Contributor

Added another example to show how to use a GeoExt.data.proxy.Protocol to
load features into a FeatureStore and sync this store with a vector-layer.

Added another example to show how to use a GeoExt.data.proxy.Protocol to
load features into a FeatureStore and sync this store with a vector-layer.
@marcjansen
Copy link
Member

Thanks for this. I have three very minor and cosmetic remarks:

  1. Can you use the following as the background of the attribution control? I personally like this better, Your mileage may vary.

    diff --git a/examples/grid/feature-grid-w-proxy.html b/examples/grid/feature-grid-w-proxy.html
    index 044e23e..64bba6f 100644
    --- a/examples/grid/feature-grid-w-proxy.html
    +++ b/examples/grid/feature-grid-w-proxy.html
    @@ -14,7 +14,8 @@
    
                <style>
                    div.olControlAttribution {
    -                           background-color: #157FCC;
    +                           background-color: rgb(237,237,237);
    +                           background-color: rgba(237,237,237,0.7);
                        }
                </style>
  2. Can we have a more distinct selected style of the features in the map? Sth. like:

    diff --git a/examples/grid/feature-grid-w-proxy.js b/examples/grid/feature-grid-w-proxy.js
    index 9a6b420..a4b1b49 100644
    --- a/examples/grid/feature-grid-w-proxy.js
    +++ b/examples/grid/feature-grid-w-proxy.js
    @@ -55,10 +55,22 @@ Ext.application({
             strokeColor: "yellow",
             graphicName: "circle"
         };
    -        var style = new OpenLayers.Style(template);
    +        var defStyle = new OpenLayers.Style(template);
    +        var selStyle = new OpenLayers.Style(
    +                Ext.apply(
    +                    Ext.apply({}, template),
    +                    {
    +                        strokeWidth: 3,
    +                        pointRadius: 15,
    +                        fontSize: "15px",
    +                        fontWeight: "bold"
    +                    }
    +                )
    +            );
         var vecLayer = new OpenLayers.Layer.Vector("vector", {
             styleMap: new OpenLayers.StyleMap({
    -                'default': style
    +                'default': defStyle,
    +                select: selStyle
             })
         });
  3. You are mixing tabs and spaces in both html and js. Would you mind changing this to be all spaces?

This is a long comment, but everything is absolutely minor.

Please merge with or without adressing my remarks.

According to the comments by @marcjansen some minor style adaptions are
added by this commit.
@chrismayer
Copy link
Contributor Author

Thanks for the review @marcjansen, I adressed your comments and added two more commits.

@marcjansen
Copy link
Member

Great & thanks, please merge!

chrismayer added a commit that referenced this pull request Nov 27, 2014
Add example for loading features via ProtocolProxy
@chrismayer chrismayer merged commit b810d65 into geoext:master Nov 27, 2014
@chrismayer chrismayer deleted the example-protocol-proxy branch November 27, 2014 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants